Grade 11 - WS 2-Python
Grade 11 - WS 2-Python
Worksheet -2 2021-22
INFORMATICS PRACTICES
Grade: XI
5. What are python comments? Which character is used to determine the beginning of a
python comment?
6. Differentiate interactive and script mode of Python programming language?
7. Write a Python program to create the multiplication table (from 1 to 10) of a number.
8. Write a python program to acquire marks for a student (out of 100). The program should
display Pass if marks are greater of equal to 33 or else should display Fail.
9. Write a program to print the following pattern
@
@@
@@@
@@@@
@@@@@
b) a,b=3,4
a,b,c=b,a+3,b-1
print(a,b,c)
11. Write Python programs for the following-
• To find out the simple interest.
• To get all the prime numbers between a given range.
• To find out the area of the triangle.
• To convert Celsius to Fahrenheit.
• To check if a number is odd or even.
• To find out the sum of a three digit number.
12. Draw a flowchart to check if a person is eligible to vote or not.
13. How many times following loop will execute?
for i in range(10,50,5):
print i
14. Which function is used
i. to check the given string is alphanumeric or not
ii. to convert the string in lower case.
15. Write a program that reads a string and checks whether it is a palindrome string or not?
16. “Python is an Interpreted Language”? Justify.
17. What is following code doing? What would it print for Input as 3?
n = int(input (“Enter an Input: “))
if n < 1:
print(“Invalid value”)
else:
for i in range(1, n+1):
print( i*i )
18. What is a string slice? How is it useful?
19. Give any 3 rules for naming a variable.
20. Write the equivalent Boolean value
a. 7+3*4<3*3+4
b. 4+3*4==3*3+7
21. What is a data type? Give any 3 examples.
22. What are the different forms of if statements? Explain with syntax.
23. what will be the output of following python statements
print(type(100))
print(type(100/2))
print(type('0'))
print(type(5.2))
24. Write an algorithm to find the biggest among 3 numbers.
25. What will be the output of the following code:-
X = 10
X =X+10
X = X//4
print (X)
X, Y = X-2, X%2
print(X, Y)