0% found this document useful (0 votes)
4 views2 pages

Ip Worsheet 1

This document is a worksheet for Grade XI students at Mansukhbhai Kothari National School for the academic year 2024-25, focusing on the topic of Iterative Constructs in Python. It includes various exercises such as correcting syntax errors in Python code, predicting outputs of code fragments, and writing programs for tasks like calculating factorials, generating multiplication tables, and checking for palindromes. The worksheet aims to enhance students' understanding of loops and iterative programming concepts.

Uploaded by

mjehansm
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)
4 views2 pages

Ip Worsheet 1

This document is a worksheet for Grade XI students at Mansukhbhai Kothari National School for the academic year 2024-25, focusing on the topic of Iterative Constructs in Python. It includes various exercises such as correcting syntax errors in Python code, predicting outputs of code fragments, and writing programs for tasks like calculating factorials, generating multiplication tables, and checking for palindromes. The worksheet aims to enhance students' understanding of loops and iterative programming concepts.

Uploaded by

mjehansm
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

MANSUKHBHAI KOTHARI NATIONAL SCHOOL

ACADEMIC YEAR 2024-25


WORKSHEET No. 5
GRADE: XI DATE : 25/01/2025
SUBJECT: INFORMATICS PRACTICES (065) DAY: Tuesday
TOPIC: Iterative Constructs in Python DATE:

Section A
1. Rewrite the following Python code after removing all syntax errors. Underline each
correction done in the code.
Num = int (“Enter any Number: “)
Sum = 0
for I in range (10, Num, 3)
Sum+=i
if i%2==0:
print i*2
Else:
print i*3
2. How many time(s) the following loop will execute?
for x in range(-300, 300, 100):
print(x, end=” ”)
3. How many time(s) the following loop will execute?
for A in [15, 30, 50, 100]:
print(A,” % ”)
4. How many time(s) the following loop will execute?
for K in range(10):
print(K, end=”@”)
print(K*2, end=”\n”)

5. Predict the output of the following code fragments:


i) for K in range(11,15):
print(K)
ii) for J in range(10):
print(J, end=” ”)

1
iii) for I in range(5, 20, 3):
print(I, end=” \t”)
iv) for K in range(200, 100, -30):
print(K, end=”\n”)
v) for J in range(50, 100, 15):
print(J*2, end=”*”)
else:
print(“Loop Ends…”)
6. How many time(s) the following loop will execute?
i) for J in range(101,125):
if J % 7 == 0 :
print(J)
ii) i=10
while i <50:
print(“Hello”)
i=i+5
Section B
7. Write a program to find factorial value of the given number.
8. Write a program to print the multiplication table of any number given by a user.
num = int(input("Enter the number : "))

9. Write a program to display the factors of a number.


10. Write a program to find the sum of even numbers and odd numbers from 100 to 500 using
for loop.
11. Write a program to find the sum of digits of a number entered by user.
12. Write a program to reverse the digits of a number entered by user and display.
13. Write a program to count the number of values divisible by 3 in the range 20-50.
14. Write a program to display the number of values divisible by 5 in the range 101-500.
15. Write a program to display all the values divisible by 8 in the range 200-500 using while
loop.
16. Write a program to check whether a number entered by user is palindrome or not.

You might also like