0% found this document useful (0 votes)
68 views

Grade 11 - WS 2-Python

This worksheet contains 25 questions about Python programming concepts like arithmetic operators, string manipulation, conditional statements, loops, functions, data types, and algorithms. Students are asked to write short Python programs to demonstrate their understanding of these concepts. They are also asked to explain Python features, trace code execution, and draw a flowchart.

Uploaded by

Abel Varughese
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

Grade 11 - WS 2-Python

This worksheet contains 25 questions about Python programming concepts like arithmetic operators, string manipulation, conditional statements, loops, functions, data types, and algorithms. Students are asked to write short Python programs to demonstrate their understanding of these concepts. They are also asked to explain Python features, trace code execution, and draw a flowchart.

Uploaded by

Abel Varughese
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

LEADERS PRIVATE SCHOOL, SHARJAH

Worksheet -2 2021-22
INFORMATICS PRACTICES
Grade: XI

Answer the following questions:


1. What are different arithmetic operators used in Python?
2. Find the output-
x = '22' + '3'
print(x)
3. Write a program that asks the user to enter a string. The program should then print the
following:
• The total number of characters in the string
• The string repeated 10 times
• The first character of the string
• The first three characters of the string
• The last three characters of the string
• The string backwards
4. What would range (1, 15, 3) return?

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
@
@@
@@@
@@@@
@@@@@

10. What will be the output of following?


a) a=20
b=a+1
a=33
print(a+b)

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)

You might also like