This type of programming language is easy for humans to read and write.
high-level language
This function allows the user to type information into a program.
input()
This statement checks whether a condition is true.
if
This loop repeats code a specific number of times.
for loop
What will this print?
print("Hello")
Hello
This symbol is used to assign a value to a variable.
=
This data type is returned by the input() function by default.
string
This keyword runs when the if condition is false.
else
This loop runs while a condition is true.
while loop
name = "Alex"
print("Hi", name)
Hi Alex
This Python function is used to display text on the screen.
print()
Which is the correct variable name:
2name, my-name, my_name, or my name.
my_name
This keyword checks another condition after an if statement.
elif
This function generates numbers used in for loops.
range()
for i in range(3):
print(i)
0
1
2
Python requires this to define blocks of code inside loops and conditions.
indentation
This function converts user input into a number.
int()
This operator checks if two values are equal.
==
This statement stops a loop immediately.
break
x = 9
y = 4
print(x + y * 2)
17
Python treats Name and name as different variables because it is this type of language.
case-sensitive
This operator assigns a value to a variable.
=
This operator means not equal to.
!=
This statement skips the current loop iteration but continues the loop.
continue
x = 0
for i in range(5):
x += i
print(x)
10