CLASS XI
COMPUTER SCIENCE
PYTHON FUNDAMENTALS
ASSIGNMENT
Marking Scheme(20 Marks)
Q 1to 5 – 1 Mark each
Q6,7 – 2.5 Mark each
Q8 to 12 – 2 Marks each
1. Write the types of mode for working in Python IDLE.
2. Which of the following identifier names are invalid and why?
a Serial_no. e Total_Marks
) )
b 1st_Room f) total-Marks
)
c) Hundred$ g _Percentage
)
d Total Marks h True
) )
3. How many types of strings are supported in Python?
4. What factors guide the choice of identifiers Names in Programs?
5. Write the output of the following:
a) num1 = 4
num2 = num1 + 1
num1 = 2
print (num1, num2)
b) num1, num2 = 2, 6
num1, num2 = num2, num1 + 2
print (num1, num2)
6. Give the output of the following when num1 = 4, num2 = 3, num3 = 2
a) num1 = num1 ** (num2 + num3)
print (num1)
b) num1 **= num2 + num3
c) num1 = '5' + '5'
print(num1)
d) num1 = 2+(3*12)/10
print(num1)
e) num1 = 24 // 4 // 2 print(num1)
GDG\XI\COMPUTER SCIENCE\PYTHON FUNDAMENTALS\ASSIGNMENT
Page 1
7. Which data type will be used to represent the following data values
and why?
a) Number of months in a year
b) Resident of Delhi or not
c) Mobile number
d) Perimeter of a square
e) Address of the student
8. Write a program to enter two integers and perform all arithmetic operations on
them.
9. Write a program to swap two numbers using a third variable.
10. Write a program to repeat the string ‘‘GOOD MORNING” n times. Here ‘n’ is
an integer entered by the user.
11. The volume of a sphere with radius r is 4/3πr3. Write a Python program to find
the volume of spheres with radius 7cm.
12. Write a program that asks the user to enter their name and age. Print a
message addressed to the user that tells the user the year in which they will
turn 100 years old.
GDG\XI\COMPUTER SCIENCE\PYTHON FUNDAMENTALS\ASSIGNMENT
Page 2