Python Basics
Variables and Input
Conditions
Loops
Code Output
100

This type of programming language is easy for humans to read and write.

high-level language

100

This function allows the user to type information into a program.

input()

100

This statement checks whether a condition is true.

if

100

This loop repeats code a specific number of times.

for loop

100

What will this print?

print("Hello")

Hello

200

This symbol is used to assign a value to a variable.

=

200

This data type is returned by the input() function by default.

string

200

This keyword runs when the if condition is false.

else

200

This loop runs while a condition is true.

while loop

200

name = "Alex"
print("Hi", name)

Hi Alex

300

This Python function is used to display text on the screen.

print()

300

Which is the correct variable name: 

2name, my-name, my_name, or my name.

my_name

300

This keyword checks another condition after an if statement.

elif

300

This function generates numbers used in for loops.

range()

300

for i in range(3):
    print(i)

0
1
2

400

Python requires this to define blocks of code inside loops and conditions.

indentation

400

This function converts user input into a number.

int()

400

This operator checks if two values are equal.

==

400

This statement stops a loop immediately.

break

400

x = 9
y = 4
print(x + y * 2)

17

500

Python treats Name and name as different variables because it is this type of language.

case-sensitive

500

This operator assigns a value to a variable.

=

500

This operator means not equal to.

!=

500

This statement skips the current loop iteration but continues the loop.

continue

500

x = 0
for i in range(5):
    x += i
print(x)

10