What are variables used for?
To store values in python
Name a type of conditional statement
if-elif-else
Name two types of loops
for and while
Decimal to binary
56
111000
What changes byte code to running code
Virtual Machine
Name at least two types of data types
String, Boolean, Number, List, Tuple, Dictionnary
Name the conditional operators
==, <=, >=, <, >, and, or, not
is while a definite loop?
no
101
5
What changes source code to byte code
A compiler
What are modules?
Contains variables, functions, and classes
What does the following code output:
x = 1
if x<3:
print true
else
print false
true
syntax for for loop is
for variable in range (end):
binary to hexadecimal
1011101
5D
Where do we import code from
Library modules
Can a variable be named for?
no
Write code to test if a variable is even or odd
if a%2 == 0:
print even
else
print odd
write a for loop to print 1 through 5
for i in range(5):
print i
decimal to hexadecimal
120
78
Is an official language of what company
Name at least two keywords in Python
for, if, else, while
Write code to print yes if number is even and greater than 10, maybe if number is even and less than or equal to 10, and no if none of the above is true
if i%2 == 0 and i>10:
print yes
elif i%2==0:
print maybe
else:
print no
write an infinite loop
while 1==1:
print infinite
octal to hexadecimal
76
3E
Guido Van Rossum