Conditionals (if,else)
Data types (str, int etc)
Print function
Variables
Input Function
100

What is the keyword used to check a condition in Python?

if

100

What data type is used for numbers without decimals in Python?

int

100

What function is used to display output to the console?

print()

100

How do you create a variable named age with a value of 15?

age = 15

100

What function is used to get user input in Python?

input()

200

What is the keyword to specify an alternative condition in Python?

elif

200

What is the data type of the value "Hello, World!" in Python?

str (string)

200

What is the output of this code: print("Hello", "World")


Hello World

200

What is the value of x after this code: 

x = 10 

x = 5

5

200

How do you store user input as a variable called name?

name = input()

300

What keyword would you use if you want to execute code when all conditions are false?

else

300

What is the data type for a number with decimals, like 3.14

float

300

Assume you have a variable named "name" which is equal to your name. How would you print "Hello name"?

print("Hello", name)

300

How do you assign the same value to two variables a and b in one line?

a = b = 10

300

What does this code do? 

age = input("Enter your age: ")

print("You are", (age),  "years old")


It asks the user for their age and then prints a sentence with their input.

400

What is the result of this code: 

if 5 > 3:    

      print("Yes") 

else:    

      print("No")

Yes

400

How do you convert a string s = "10" into an integer?

int(s)

400

What is the difference between print(5) and print("5")?

The first prints the integer 5, while the second prints the string "5".

400

What is the result of this code? 

x = 3

y = x + 2

print(y)


5

400

How do you make sure the input is an integer?

Use int(input())

500

How do you write an if statement that checks if a variable x is greater than 10 and less than 20?

if 10 < x < 20:

500

What is the output of this code:

x = "5"

y = 2

print(int(x) * y)


 

10

500

How can you print the following output using only one print() statement and concatenation(using +)? 

Hello World Python



print("Hello" + " " + "World" + " " + "Python")


500

What is the best practice for naming variables that store a person's first name?

Use meaningful variable names like first_name (snake_case for readability).

500

What happens if you try to convert a non-numeric string like "abc" to an integer using int()?

Raises a ValueError