CS Prctical File Class XI
CS Prctical File Class XI
INDEX
Pr. Date Topic Page Teacher’s
No no sign
1 Write a python program to input a welcome message and display it.
2 Write a python program to input two numbers and display the larger /
smaller number.
3 Write a python program to input three numbers and display the largest
/smallest number.
4 Generate the following patterns using nested loop.
5 Write a program to input the value of x and n and print the sum of the
following series:
a. 1 + x2 + x3 + ... + xn
b. x - x2/2! + x3/3! - x4/4! + x5/5! - x6/6!
6 Write a program to determine whether a number is a perfect number, an
Armstrong number or a palindrome.
7 Write a program to input a number and check if the number is a prime
or composite number.
8 Write a program to display the n terms of a Fibonacci series.
9 Write a python program to compute the greatest common divisor and
least common multiple of two integers.
10 Write a program to count and display the number of vowels, consonants,
uppercase, lowercase characters in string.
11 Write a menu driven program for list manipulation. Display menu as:
1. Add a record
2. View record
3. Delete Record
4. Modify record
5. Exit
12 Write a menu drive program to the following from the list:
1. Maximum
2. Minimum
3. Sum
2
4. Sort in Ascending
5. Sort in Descending
6. Exit
13 Write a program to input a list of numbers and swap elements at the
even location with the elements at the odd location.
14 Write a program to input a list of number and interchange first element
to last element.
15 Write a program to create a tuple with user input and search for given
element.
16 Write a program to create tuple with user input and display the square
of numbers divisible by 3 and display cube of numbers divisible by 5.
17 Write a menu driven program to do the following using a dictionary.
1. Display Contacts
2. Add Contact
3. Delete a Contact
4. Change a phone number
5. Search Contact
6. Exit
18 Write a program to Create a dictionary with the roll number, name and
marks of n students in a class and display the names of students who
have scored marks above 75.
19 Write a program to create a dictionary and store salesman name as a key
and sales of 3 months as values. Give the bonus to the salesman
according to the given criteria:
1. Total Sales < 10K – No Bonus
2. Total Sales 10K to 20K – 5%
3. Total Sales 21K to 30K – 8%
4. Total Sales 31K to 40K – 10%
20 Write a program to enter a team name, wins and losses of a team. Store
them into a dictionary where teams names are key and winds and losses
are values stored as a list. Do the following based on the dictionary
created above:
• Find out the team’s winning percentage by their names
• Display the no. of games won by each team in a list
• Display the no. of games lost by each team in a list
3
Ex.No:- 1
PROGRAM TO INPUT A WELCOME MESSAGE AND DISPLAY IT
Date:-
Aim:
Coding:
Output:
4
Ex.No:- 2
Date:-
Aim: