Kendriya Vidyalaya Sanghatan, Silchar Region
Class:11 Informatics Practices - Lab Assignment
Session: 2019-20
Section: Programming in Python
Target: Expressions, conditionals, loops, list, dictionary, and strings should be covered
Programs:
1. To find average and grade for given marks,
2. To find amount for given cost-qty-discount,
3. To calculate cost perimeter-wise/ area-wise,
4. To calculate interest (Simple and Compound)
5. To calculate profit-loss for given Cost and Sell Price
6. To calculate EMI for Amount, Period and Interest,
7. To calculate tax (examples from GST/Income Tax)
8. To find the largest and smallest numbers in a list.
9. To find the third largest number in a list.
10. To find the sum of squares of the first 100 natural numbers.
11. To find whether a string is a palindrome or not.
12. To compute xn, for given two integers x and n,
13. To compute the greatest common divisor and the least common multiple of two integers.
14. To test if a number is equal to the sum of the cubes of its digits. Find the smallest and largest such numbers in the range of 100 to 1000.
SECTION: Data Handling
Target: Creation of numpy array, operation on numpy array and operation in between ndarray
Programs:
1. Import numpy as `np` and print the version number.
2. To create an array of 1D containing numeric values 0 to 9
3. To create a numPy array with all values as True
4. To extract all odd numbers from numPy array
5. To extract all even numbers from numPy array
6. To copy the content of an array A to another array B, replacing all odd numbers
of array A with -1 without altering the original array A
7. To replace all odd numbers in numPyarr with -1
8. To copy content of a 1D array into a 2D array with 2 rows
SECTION : Data Management
Target: Create, insert, delete, select should be covered
Program:
Student_id
|
class
|
section
|
gender
|
name
|
DOB
|
Marks
|
101
|
11
|
A
|
Male
|
Jacob
|
30-12-2010
|
456
|
102
|
10
|
A
|
Female
|
Suzy
|
12-12-2010
|
478
|
103
|
11
|
A
|
Female
|
Evelyn
|
1-5-2010
|
488
|
104
|
10
|
B
|
Male
|
Sam
|
7-8-2009
|
452
|
105
|
10
|
B
|
Male
|
John
|
5-5-2009
|
398
|
106
|
11
|
B
|
Female
|
Scarlett
|
4-10-2010
|
478
|
107
|
11
|
A
|
Male
|
Tom
|
5-5-2010
|
498
|
108
|
10
|
A
|
Male
|
Bill
|
7-11-2010
|
453
|
109
|
11
|
B
|
Female
|
Lily
|
10-10-2010
|
489
|
110
|
10
|
B
|
Male
|
Alex
|
7-8-2010
|
478
|
Considering the Above table write the query
1. To create a database
2. To create student table with the student id, class, section, gender, name, dob, and marks as attributes where the student id is the primary key.
3. To insert the details of at least 10 student in the above table.
4. To delete the details of a particular student in the above table.
5. To increase marks by 5% for those students, who have Rno more than 20
6. To display the entire content of table on screen
7. To display Rno, Name and Marks of those students, who are scoring marks
more than 450.
8. To find the average of marks from the student table
9. To find the number of students, who are from section ‘A’
10. To add a new column email of appropriate data type
11. To find the minimum and maximum marks obtained by students
12. To modify email for each student.
13. To display the information all the students, whose name starts with ‘J’ (Examples: Jacob, John…)
14. To display Rno, Name, DOB of those students, who are born between ‘2005-01-01’ and ‘2005-12-31’
15. To display Rno, Name, DOB, Marks, Email of those male students in ascending order of their names.
16. To display Rno, Gender, Name, DOB, Marks, Email in descending order of