ASIA INTERNATIONAL SCHOOL
Committed to educating and achieving the full potential of pupils in the rapidly changing world.
INFORMATION AND COMMUNICATION TECHNOLOGY (ICT)
ICT Lab Activity-Python Worksheet-1
Grade 7
Name: Section:
Date: Teacher:
• Python Practice Worksheet
Class: Grade 7
Time: 45 minutes
Instructions:
• Read each question carefully.
• Write and run the Python code in the lab.
• Use proper indentation.
� Part A: Concept Check (Short Answer)
1. What is the purpose of the if statement in Python?
2. Write the symbol for:
o Greater than
o Less than or equal to
o Equal to
3. What is the difference between = and == in Python?
�_ Part B: Coding Practice (Write Python Programs)
�1 Check Even or Odd
Write a program that takes a number from the user and checks whether it is even or odd.
Hint: Use the % operator.
� Voting Eligibility
Write a program that asks the user for their age.
• If the age is 18 or above, print "You are eligible to vote".
• Otherwise, print "You are not eligible to vote".
� Positive, Negative, or Zero
Write a program that takes a number and checks:
• If it is positive
• If it is negative
• If it is zero
G Pass or Fail
�
Write a program that asks the user to enter their marks.
• If marks are 50 or more, print "Pass"
• Else, print "Fail"
� Simple Login System
Create a program that checks a password:
• If the password is "python123", print "Access Granted"
• Else, print "Access Denied"
t Part C: Operators Practice
�s
�O Compare Two Numbers
Ask the user to enter two numbers and:
• Print which number is greater
• If both are equal, print "Both numbers are equal"
� Temperature Check
Write a program that takes temperature as input:
• If temperature is above 30, print "Hot Day"
• Else, print "Normal Day"
� Challenge Question (Optional)
8 Grading System
�
Write a program that takes marks and prints:
• "Excellent" if marks ≥ 80
• "Good" if marks ≥ 60
• "Needs Improvement" if marks < 60
ANSWER KEY
Python Practice Worksheet – Grade 7
Part A: Concept Check
1. Purpose of the if statement
The if statement is used to make decisions in a program. It runs a block of code only when a condition is true.
2. Symbols
Meaning Symbol
Greater than >
Less than or equal to <=
Equal to ==
3. Difference between = and ==
Symbol Meaning
= Assigns a value to a variable
== Compares two values
Part B: Coding Practice
1. Check Even or Odd
num = int(input("Enter a number: "))
if num % 2 == 0:
print("Even")
else:
print("Odd")
2. Voting Eligibility
age = int(input("Enter your age: "))
if age >= 18:
print("You are eligible to vote")
else:
print("You are not eligible to vote")
3. Positive, Negative, or Zero
num = int(input("Enter a number: "))
if num > 0:
print("Positive")
elif num < 0:
print("Negative")
else:
print("Zero")
4. Pass or Fail
marks = int(input("Enter your marks: "))
if marks >= 50:
print("Pass")
else:
print("Fail")
5. Simple Login System
password = input("Enter password: ")
if password == "python123":
print("Access Granted")
else:
print("Access Denied")
Part C: Operators Practice
1. Compare Two Numbers
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
if a > b:
print(a, "is greater")
elif b > a:
print(b, "is greater")
else:
print("Both numbers are equal")
2. Temperature Check
temp = int(input("Enter temperature: "))
if temp > 30:
print("Hot Day")
else:
print("Normal Day")
Challenge Question: Grading System
marks = int(input("Enter your marks: "))
if marks >= 80:
print("Excellent")
elif marks >= 60:
print("Good")
else:
print("Needs Improvement")