Class 11 Computer science question for python with code solution
1 min readJul 2, 2023
1. Write a Program to enter length and breadth and calculate area of rectangle
width = input("Enter the width = ")
length = input("Enter the length = ")
area = float(width)*float(length)
print("Area is = {0}".format(area))
2. Write a Program to enter radius of circle and calculate area of circle
import math
radius = input("Enter the Radius = ")
area = float(radius)*float(radius)*math.pi
print("Area is {0}".format(area))
3. Write a program to enter Name, marks of 5 subject and calculate total & percentage of student
name = input("Enter the Name of Student = ")
english = input("Enter the Marks of English = ")
hindi = input("Enter the Marks of Hindi = ")
maths = input("Enter the Marks of Maths = ")
science = input("Enter the Marks of Science = ")
sst = input("Enter the Marks of SST = ")
total = (float(english)+float(hindi)+float(maths)+float(science)+float(sst))/5
print("Percentage for {} is {}".format(name, total))
4. Write a program to enter radius and height of cylinder and calculate volume of cylinder.
import math
radius = input("Enter the radius of cylinder = ")
height = input("Enter the height of cylinder = ")
volume = float(radius)*float(radius)*math.pi* float(height)
print("Volume is {0}".format(volume))