Variable
Input
Operators
Output
100

What is a variable in Python?

A container used to store data.

100

Which function is used to get user input?

input()

100

What does + do?

Addition

100

Which function displays output?

print()

200

Which is a correct variable name?
a) 2name
b) my_name
c) class

b) my_name

200

What does this do? 

name = input("Enter your name: ")

Stores user input in variable name

200

What is the result?

5 * 2 

10

200

What will this show?

print("Hello") 

Hello

300

What will this store?

age = 13 

The number 13

300

Why do we use int() with input?

To convert text into numbers

300

What is the result? 

10+5/5

11

300

What is wrong? 

print Assalamualaikum

Missing parentheses → print("Assalamualaikum")

400

Fix the error: 

my age = 12

my_age = 12

400

Fix the code:

age = input("Enter age: ")

times=age*5

print(times)

age = int(input("Enter age: "))

times=age*5

print(times)

400

Fix the code so the x will be 3

x=10+5/5

x=(10+5)/5

400

What is the output?

x = "S"

y="2"

a=x+y

print(a)

 

S2

500

What is the output?

x = 5

y = x

x = 10

print(y)

 

5

500

What happens if we don’t convert input to int?

It stays as text (string)

500

create program to calculate area of square with side 3.

s=3

a=s*s

print(a)

500

Combine text and variable: 

age=10

print (_______)

print("Age:", age)