Grade 7 - Revision Worksheet-1 On Python Coding
Grade 7 - Revision Worksheet-1 On Python Coding
2022 - 2023
Date:
I. List down the errors in the following codes and rewrite the correct code
[a]
A = 10
B = 15
Product = A + B
Print(“The product of two numbers is” product)
It is in capitals
[b]
Soccer_Player_Name = int(input(“Enter Player’s name?”))
Scores = int(input(“Enter total goals”))
print(Soccer_Player)
print(Goals)
[a] This program will find the sum and average of 2 written exams of Amith.
Exam1 = int(input(“Enter the scores of first exam”))
Exam2 = int(input(“Enter the scores of second exam”))
Sum = Exam1+Exam2
Average = Sum/2
[b] This program accepts 3 colors from the user and prints a meaningful
sentence out of 3 colors.
Color1 = input(“Enter the first color”)
Color2 = input(“Enter the second color”)
Revision Worksheet - 1
2022 - 2023
[a]
X = 200
Y = 500
Sum = (X * Y ) / 100
print(Sum)
1000
[b]
Flag_1 = int(input(“Enter the distance covered near First flag”))
Flag_2 = int(input(“Enter the distance covered near Second flag”))
Total_Distance_Covered = Flag_1+Flag_2
print(Total_Distance_Covered)
1. Ben needs to count the number of marbles in 3 colored boxes he has - Red, Green
and Blue Boxes. Help him write a program that will accept the number of marbles
in each box and find the total number of marbles.
3. Create a program that asks the user for a number and then prints out a list of all the
divisors of that number. (If you don’t know what a divisor is, it is a number that
divides evenly into another number. For example, 13 is a divisor of 26 because
26%13 has no remainder.)