Monday, February 17, 2020

Class:11 Computer Science- Lab Assignment


Kendriya Vidyalaya Sanghatan, Silchar Region
Class:11 Computer Science- Lab Assignment
Session: 2019-20


Section: Programming in Python
Target: Expressions, conditionals, loops, list, dictionary, and strings should be covered
Programs:
1. write a program to find the largest and smallest numbers in a list.
2. write a program to find the third largest number in a list.
3. write a program to check if a number is prime or not
4. write a program to check whether a string is a palindrome or not. (A palindrome is a word which reads the same backward as forward, such as madam, racecar)
 5. Write a program to compute xn, take x and n as input from user.
6. write a program to  Compute the greatest common divisor and the least common multiple of two integers.
7. write a program to test if a number is equal to the sum of the cubes of its digits. Find the smallest and largest such numbers.
8.  Write a program to accept a number from the user and display whether it is an even number or odd umber.
9. Write a program to accept percentage of a student and display its grade accordingly.
10. Write a program to print Fibonacci series up to certain limit.
( example: 0 1 1 2 3 5 8 13…)
11. Write a program to display prime numbers up to a certain limit.
12. Write a program to accept a number, find and display whether it’s a Armstrong number or not.
(Armstrong number is a number that is equal to the sum of cubes of its digits.)
13. Write a program to accept a number and find out whether it is a perfect number or not.
14. Write a program to print the following pattern:
1
1 2
1 2 3
15. Write a program that counts the number of alphabets and digits, uppercase letters, lowercase letter, spaces and other characters in the string entered.
16. Write a program to accept a string ( a sentence) and returns a string having first letter of each word in capital letter.
17. Write a program to remove all odd numbers from the given list.
18. Write a program to display second largest element of a given list.
19. Write a program to display cumulative elements of a given list.
20. Write a program to display frequencies of all the elements of a list.
21. Write a program in Python to display those strings which are string with ‘A’ of given list.
22. Write a program in Python to find and display the sum of all the values which are ending with 3 from a list.
23. Write a program to shift the negative number to left and the positive numbers to right.
24. Write a program to sWrite a program the content with next value divisible by 7.
25. Write a program to accept values from user and create a tuple.
26. Write a program to input total number of sections and stream name in 11
class and display all information on the output screen.
27. Write a Python program to input names of ‘n’ countries and their capital and currency, store it in a dictionary and display in tabular form. Also search and display for a particular country.


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

Share: