Professional Documents
Culture Documents
Class 10 Computer Science MCQ and Programs
Class 10 Computer Science MCQ and Programs
Study Material
1.Which of the following is used for single line comment in python program?
a)$ b)/ c)# d)&
2.) _________function is used to display information in python program
a) display( ) b) get() c) print() d)int( )
3.)_________________function is used to get input value in python .
a) in ( ) b) enter( ) c) print( ) d) input( )
4.) which is the correct method to assign value in python
a) 30= mark b)mark=30 c) mark==30 d) mark(30)
5.)what will be output of this code:
print(type(34))
ans: <class_int> or integer
1.write a python program to get two numbers and perform all arithmetic operations .
num1=int(input(“enter num1”))
num2=int(input(“enter num2”))
print(“addition” , num1+num2)
print(“subtraction” , num1-num2)
print(“multiplication” , num1*num2)
print(“division ” , num1/num2)
print(“remainder or modulous”, num1%num2)
print(“power” , num1**num2)
print(“floor division ” , num1//num2)
2. write a program to find area of rectangle for given length and breadth.
m1=int(input(“enter mark”))
m2=int(input(“enter mark”))
m3=int(input(“enter mark”))
m4=int(input(“enter mark”))
m5=int(input(“enter mark”))
total=m1+m2+m3+m4+m5
avg=total/5
print( “total=”, total )
print (“average=”, avg )
5.write a program to get principal amount , rate of interest , number of years and calculate simple interest .