0% found this document useful (0 votes)
4 views4 pages

Python Assign Class XI 2023

The document contains a series of programming exercises for Class XI Computer Science students focusing on Python fundamentals, including if-else statements, loops, and data structures like strings, lists, tuples, and dictionaries. Each exercise requires students to write Python programs to perform specific tasks such as calculating simple interest, finding areas, checking conditions, and managing data. The exercises aim to enhance students' understanding of Python programming concepts and problem-solving skills.

Uploaded by

Vandana Mittal
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)
4 views4 pages

Python Assign Class XI 2023

The document contains a series of programming exercises for Class XI Computer Science students focusing on Python fundamentals, including if-else statements, loops, and data structures like strings, lists, tuples, and dictionaries. Each exercise requires students to write Python programs to perform specific tasks such as calculating simple interest, finding areas, checking conditions, and managing data. The exercises aim to enhance students' understanding of Python programming concepts and problem-solving skills.

Uploaded by

Vandana Mittal
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
You are on page 1/ 4

Cambridge School, Indirapuram

Program File Questions – Python


Class XI – Computer Science
Python fundamentals, if else, elif

1. WAP to input P, R, and T from user. Calculate simple interest and print it on the screen.
2. WAP to find out area of circle. Input the value of R from user.
3. WAP to input two numbers from user. The program will print the largest number.
4. WAP to input name and age of the person. Check whether the person is major/minor. Print suitable message
along with his/her name.
5. WAP to input the sales amount from the salesman. The commission percentage will be 12% if the sales
amount is >20000 otherwise the percentage will be 10%.
6. WAP to input percentage of the student. Check whether that student is pass or fail. (<33 is fail)
7. WAP to input the student name and marks in 5 subjects. Calculate total and percentage. Then find out the
grade of the student as per the given criteria:
Percentage Grade
>=80 A
>=60 <80 B
>=33 <60 C
<33 F
8. WAP to input the name, age and gender(‘M’/’F’/’O’). Find out the voting booth of the person as per the given
criteria:
if age>=18 then only he/she is eligible to vote otherwise can’t vote. Then check gender of eligible person, if
gender is ‘M’ then voting booth will DPSI otherwise voting booth will be CSI.
Print suitable message in user friendly format.
9. WAP to input the name and house of a student. Check the house of the student if it is “Aravali” or
“Dhauladhar”, Print a message “Come to school on 15 May at 9.00 am” otherwise print “No practice”.
10. Write a program to create a simple calculator performing only four basic operations.
11. Display the appropriate message as per the colour of signal at the road crossing.
12. Program to print the positive difference of two numbers.
13. WAP to find the area of triangle using HERONS formula.
Formula => Area of a triangle = (s*(s-a)*(s-b)*(s-c))-1/2. Here, ‘s’ is the semi-perimeter and a, b and c
are three sides of the triangle.
14. WAP which accept temperature in Fahrenheit and print it in centigrade.
Formula => [c=5/9*(T-32)]
15. WAP to input total units consumed by a customer, calculate and display total bill amount to be paid by the
customer. It will be calculated as per the following criteria:
No. of units Rate(in Rs)
First 100 Units 1 Rs per unit.
Next 200 Units 2 Rs per unit.
Above 300 Units 4 Rs per unit.
16. Write a python program to check whether the entered character is an alphabet or not.
17. Write a program to input a character and check whether it is a vowel or not.
LOOPS, NESTED LOOPS

18. Program to input a number from user. Print its table.


19. Program to print reverse counting from 10-1.
20. Program to print all the odd numbers starting from 1-n.
21. Program to print the sum of all the odd numbers starting from 1-n.
22. Program to input n different numbers from user. Program will print the sum of those numbers.
for example : if the n is 3, then ask any three numbers from user and suppose user enters 1,3, 5 then the
output should be : 9 (1+3+5)
23. Program to input age of n people. Program will count and print the frequency of the people as per the given
criteria:
Children <18
Adult >=18 <60
Sr. Citizen >=60
For example: if the value of n is 5 i.e. you will ask age of 5 people. For ex. the values for the age are :
50,60,12,67,18 then output should be:
Frequency of Children – 1
Frequency of Adult – 3
Frequency of Sr. citizen – 1
24. Program to input ‘n’ numbers from user and print the largest number among them.
25. Program to input ‘n’ characters from user and print frequency of alphabets, digits and special symbols.
26. Program to print all the Prime numbers from 1 to ‘n’.
27. Program to input ‘n’ strings from user and print the frequency of vowel letters present in each string.
28. Program to print Fibonacci series from 1 to ‘n’.
For example: if n is 8 then the output should be :
0,1,1,2,3,5,8
29. Write a menu driven program which does the following operation for a particular number:
a. Prime
b. Armstrong
c. Palindrome
d. Perfect
e. Automorphic
f. Exit
STRINGS, LISTS, TUPLES, DICTIONARIES

30. Program to input a string from user. The program will count and print the frequency of vowels letters present
in the string.
31. Program to input a string from user. Check whether it is Palindrome or Not.
32. Program to input a string from user. Program will remove all the duplicate adjacent spaces present in the
string. For example: if the string is - “Hello I am Deepak”. Then the output should “Hello I am Deepak”
33. Write a menu driven program which will input a paragraph from user. The program will convert the string
into the corresponding case and print the result. The menu should provide following functionalities :
a) UPPER CASE
b) lower case
c) Title Case
d) tOOGLE cASE
e) Sentence case
f) Exit
34. Program to input n values in the list. Program will calculate and print the sum of those values individually
which are stored at even and odd index.
35. Program to input n values in the list. Program will check whether the list is arranged in ascending order,
descending order or not arranged.
36. Program to input n values in the list. Input the value and search in the list. If the value exists print its index
otherwise print “Doesn’t exist”.
37. Program to input n values in the list. Arrange the list in descending order and print the result.
38. Program to input n values in the list. Check the frequency of Perfect numbers stored in the list.
39. Program to input n values in the list. Swap the first half with the second half of the list.
40. Program to input n values in a tuple. Store odd and even numbers individually in two different tuples.
41. Program to input n values in a tuple. Count and print the frequency of Positive, Negative and Zero values
present in the list.
42. Write a menu driven program which prints the following menu and performs the given operation on the
students’ data:
1. Insert
2. Display all
3. Topper details
4. Failure details
For option 1. Insert, program inputs Rno, name, marks in five subjects (in list form) of one child, calculates
the percentage and adds Rno, name and percentage in the dictionary.
43. Write a menu driven program which prints the following menu and performs the given operation on the
books’ data (bid, bname, author, price):
a. Insert
b. Display all
c. Search
d. Update
e. Delete
f. Exit
44. Write a menu driven program which prints the following menu and performs the given operation to manage
the contact list (name, phno1, phno2, email)
a. Insert
b. Display all
c. Search by name
d. Search by phone number
e. Update
f. Delete
g. Exit
45. Write a program which will input your friends name in a list. Program will guess and print who could your
best friend, bad friend, so called Enemy etc. (use functions of random module)

You might also like