Professional Documents
Culture Documents
NAME:
MAYANK SHARMA
CLASS:
XI
SECTION:
A
ROLL NO:
Teacher’s signature
INDEX (TERM 1)
S.NO PROGRAMS REMARK
Program:1 Write a program in
python to input marks in
5 subjects from the user
and display the average
marks.
Program:2 Write a program in
python to read details like
name, class, age of a
student and then print
the details firstly in same
line and then in separate
lines.
Program:3 Write a program in
python to input a number
and print its first five
multiples
Program:4 Write a program to read a
number n and print n2, n3
and n4
Program:5 Write a program that
generates the
following output: 5 @
10 @9
Program:6 Write a program in
python to input P, R and T
from the user and
calculate the Simple
interest.
Program:7 Write a program in
python to input side
of the square from
the user and display
its perimeter
Program:8 Write a program in
python to input quantity
and price per item from
the user and calculate the
total amount
Program:9 Write a program to
input radius of a circle
from the user and
display area of circle.
Program:10 Write a program to
calculate compound
interest.
Program:11 11. Write a program in
python to calculate area
of triangle, rectangle and
square.
Program:12 12. Write a program in
python to input a string
and print the pattern
like this:
t
t o
t o d
t o d a
t o d a y
Program:13 13. Write a program in
python to count the
number of digits,
uppercase and lowercase
letters in a string.
Program:14 Write a program to check
whether a given string is
palindrome or not.
Program:15 The marks obtained by a
student in computer
science is input by the
user. Your program
should display the grade.
The student gets a grade
as per the following rules:
marks Grade
90-100 A
80-89 B
70-79 C
60-69 D
0-59 F
Program:16 Program calculates the
sum of numbers entered
by the user using while
loop.
OUTPUT:
2. Write a program in python to read details like name, class,
age of a student and then print the details firstly in same
line and then in separate lines.
OUTPUT:
4. Write a program to read a number n and print n2, n3 and n4
OUTPUT:
OUTPUT
6. Write a program in python to input P, R and T from the
user and calculate the Simple interest.
OUTPUT
OUTPUT:
8. Write a program in python to input quantity and price
per item from the user and calculate the total amount.
OUTPUT
OUTPUT
10. Write a program to search an element from the
list ,if exists, display message “element found” else
display “element not found”
OUTPUT:
(1)
(2)
OUTPUT
15. The marks obtained by a student in computer science is input by the
user. Your program should display the grade. The student gets a grade
as per the following rules:
marks Grade
90-100 A
80-89 B
70-79 C
60-69 D
0-59 F
OUTPUT
16.Program calculates the sum of numbers entered by the user using
while loop.
OUTPUT
OUTPUT
18. Write a program that accepts a number from the user and calculate
the factorial of that number. The factorial of an integer n is defined as
n ! = n ( n - 1)( n - 2)( n - 3) ... (3)(2)(1) ; if n>0
For example, 5! = 5 x 4 x 3 x 2 x 1
Using while loop.
OUTPUT
19. Write a program to obtain the first 10 numbers of a Fibonacci
sequence. In a Fibonacci sequence the sum of two successive terms
gives the third term.
Following are the first 10 terms of the Fibonacci sequence:
0 1 1 2 3 5 8 13 21 34
OUTPUT
20. Write an if-else statement that assigns 0 to the variable b, if the
variable a is less than 10. Otherwise, it should assign 99 to the variable
b.
OUTPUT
TERM 2
INDEX (TERM 2)
S.NO PROGRAMS REMARKS
Program:1 1. Write a Program in
python to find the
common elements in
two tuples using IN and
then display the tuple.
Program:2 2. Write a program to
search an element
from the list ,if exists,
display message
“element found” else
display “element not
found”
Program:3 3. Program to create a
dictionary to enter the
marks of a student and
then display total
marks and average.
OUTPUT
2. Write a program to search an element from the list, iif
exists, display message “element found” else display “element
not found”
OUTPUT
OUTPUT
4. Program to create two lists from dictionary, one having the
keys of the dictionary and other having the values of the
dictionary.
OUTPUT
OUTPUT
OUTPUT
10. Program to delete all 0’s from the list.
OUTPUT
OUTPUT
12. Program to find a key, if not found, print the message “key
not found”.
OUTPUT
14. Write a program to create a tuple with mixed data type
and create a tuple with repetition.
OUTPUT