Professional Documents
Culture Documents
2023-24
NAME:
ROLL NO:
CLASS: XI
STREAM:
NERUL, NAVI MUMBAI
CERTIFICATE
Roll No. :
__________________
Internal Examiner
Date:
__________________ ___________________
SCHOOL SEAL PRINCIPAL
Date:
PYTHON PROGRAMS
Code:
print(msg)
SAMPLE OUTPUT:
Code:
SAMPLE OUTPUT:
3. Write Python program to print the area of circle when radius
of the circle is given by user.
Code:
PI=3.14
area = PI*radius**2
SAMPLE OUTPUT:
Code:
avg=(sub1+sub2+sub3+sub4+sub4)/5
SAMPLE OUTPUT:
5. Write a short program that asks for your height in centimetres
and then converts your height to feet and inches. (1 foot = 12
inches, 1 inch = 2.54 cm).
Code:
SAMPLE OUTPUT:
6. Write Python program to compute simple interest and
compound interest.
Code:
#simple interest
P = float(input("enter amount"))
R = float(input("enter rate"))
T = float(input("enter time"))
SI = (P * R * T) / 100
print("simple interest is", SI)
#Compound Interest
principle=float(input("Enter principle amount:"))
time=int(input("Enter time duration:"))
rate=float(input("Enter rate of interest:"))
SAMPLE OUTPUT:
7. Write Python program to calculate the Area of a Triangle
(given base and height)
Code:
area = (b * h) / 2
SAMPLE OUTPUT:
Code:
SAMPLE OUTPUT:
9. Write Python program to convert Celsius into Fahrenheit.
Code:
SAMPLE OUTPUT:
Code:
SAMPLE OUTPUT: