VARIABLES
FIX THE CODE
Mathematical Operators
Variables – Rules
100

Create a variable to store your name

name = "Ali"

100

Fix the error: 

name = Ali


name = "Ali"

100

What is the output?

print(6 + 4)


10

100

Which variable name is correct and why?

A. 1name
B. name1
C. name-1

Answer: B. name1
👉 (Variables cannot start with a number or use -)

200

Speed round asnwer within 5 second you get double points.

What is the type of variable this is: 

age = 17

Integer

200

Speed round asnwer within 10 second you get double points.

Fix the Boolean value:

is_active = true  

is_active = True

200

Speed round asnwer within 10 second you get double points.

What is module:

print(8 % 2)


0

200

Which variable uses snake_case correctly?

A. studentName
B. student_name
C. StudentName

Answer: B. student_name

300

What will this print?

x = 5
y = 2
print(x + y)  

Answer: 7

300

Speed round asnwer within 5 second you get double points.

Fix the integr variable type: 

score = "100"

score = 100

300

Speed round asnwer within 10 second you get double points.

What is:

print("5 * 2")


5 * 2

300

Speed round asnwer within 10 second you get double points.

Fix the variable name:

my age = 15



my_age = 15


👉 (No spaces allowed)

400

What is the type of variable this is:

price = 9.5

Float

400

Fix the Boolean mistake:

passed = "True"


passed = True

400

What is the output?

print(10 % 3)


1

400

Why is this wrong and why?

True = 5


Because True is a reserved word (Boolean) and cannot be used as a variable name ❌

500

Fix the variable name:

1student = "Omar"  

my age = 15


student1 = "Omar"

my_age = 15

500

Fix the print statement: 

name = "Omar"
print name

name = "Omar"
print(name)

500

What is the output:

print(18 % 5)


3

500

Double Points:

Fix ALL mistakes in this code: 

2ndName = "Ali
user name = "student"
TotalScore = 95
print = "Grade 11"

second_name = "Ali"
user_name = "student"
total_score = 95
print_name = "Grade 11"

or 

display_name = "Grade 11"

or

print ("Grade 11")

  • 2ndName ❌ → cannot start with a number → second_name and missing " at the end.
  • user name ❌ → no spaces → user_name
  • TotalScore ❌ → not snake_case → total_score
  • print ❌ → reserved word → print_name