0% found this document useful (0 votes)
314 views24 pages

Computer Science Practical File

This document contains the practical file for the Computer Science course with Python. It outlines 20 programming problems to be solved by the student, including writing programs to calculate sums and areas, randomly select students, display menus, perform arithmetic operations, check characters, print patterns and tables, find factors, illustrate loop and conditional statements, check for palindromes, search lists, manipulate tuples and dictionaries. The student is asked to write Python code to solve each problem.

Uploaded by

Palvinder Kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
314 views24 pages

Computer Science Practical File

This document contains the practical file for the Computer Science course with Python. It outlines 20 programming problems to be solved by the student, including writing programs to calculate sums and areas, randomly select students, display menus, perform arithmetic operations, check characters, print patterns and tables, find factors, illustrate loop and conditional statements, check for palindromes, search lists, manipulate tuples and dictionaries. The student is asked to write Python code to solve each problem.

Uploaded by

Palvinder Kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

COMPUTER SCIENCE PRACTICAL FILE

COURSE NAME: COMPUTER SCIENCE WITH PYTHON


NAME OF THE TEACHER: Ms. ASHMA CHAWLA (HOD OF COMPUTERS)
NAME OF THE STUDENT: PARAMPREET KAUR
CLASS- XI-A
INDEX
1. Write a program to obtain three numbers and print their sum.
2. Write a program to obtain radius of a circle and print its perimeter and area.
3. In a school fest, three randomly chosen students out of 100 students(having roll numbers 1-100) have to present
bouquets to the guests. Help the school authorities choose three students randomly.
4. Write a program to display a menu for calculating area and perimeter of a rectangle.
5. Write a program that reads two numbers and an arithmetic operator and display the computed result.
6. Write a program to print whether a given character is an uppercase or a lowercase character or a digit or any
other character.
7. Program to print table of a number using loop.
8. Program to print factorial of a number.
9. Program to illustrate the difference between break and continue statements.
10.Program to input a number and test if it is prime number.
11.Write a program to print the following pattern:
*
**
***
****
12. Write a program to read a string from user and print it in its reverse order.
13.Write a program that reads a string and checks if it is palindrome or not.
14.Write a program to search for an element in a given list of numbers.
15.Write a program that takes a tuple T as input and returns its 2 nd largest element.
16.A tuple stores marks of a student in five subjects. Write a program to calculate the grade of the student as per the
following:
Average Grade
>=75 ‘A’
60-74.999 ‘B’
50-59.999 ‘C’
<50 ‘D’
17. Write a program to input a list of numbers and swap elements at the even location with the elements at the od
location.
18.Write a program to input a 4-element tuple and unpack it to four variables. Then recreate the tuple with
elements swapped as 1st element with 3rd and the 2nd element with the 4th element.
19.Write a program to read roll number and marks of four students and create a dictionary from it having roll
numbers as keys.
20.Write a program to create a dictionary namely numerals from the following two lists.
Keys=[‘one’,’two’,’three’]
Values=[1,2,3]
1. Write a program to obtain three numbers and print their sum
2. Write a program to obtain radius of a circle and print its perimeter and area.

3. In a school fest, three randomly chosen students out of 100 students(having roll numbers 1-100) have to present
bouquets to the guests. Help the school authorities choose three students randomly.
4. Write a program to display a menu for calculating area and perimeter of a rectangle.
5. Write a program that reads two numbers and an arithmetic operator and display the computed result.
6. Write a program to print whether a given character is an uppercase or a lowercase character or a digit or any
other character
7. Program to print table of a number using loop
8. Program to print factorial of a number
9. Program to illustrate the difference between break and continue statements.
10.Program to input a number and test if it is prime number
11.Write a program to print the following pattern
12.Write a program to read a string from user and print it in its reverse order.
13.Write a program that reads a string and checks if it is palindrome or not
14. Write a program to search for an element in a given list of numbers
15. Write a program that takes a tuple T as input and returns its 2nd largest element
16. A tuple stores marks of a student in five subjects. Write a program to calculate the grade of the student as
per the following:
17. Write a program to input a list of numbers and swap elements at the even location with the elements at the
od location.
18. Write a program to input a 4-element tuple and unpack it to four variables. Then recreate the tuple with
elements swapped as 1st element with 3rd and the 2nd element with the 4th element.
19. Write a program to read roll number and marks of four students and create a dictionary from it having roll
numbers as keys.

20.Write a program to create a dictionary namely numerals from the following two lists

You might also like