Programming
Questions

Instructions

Below are 8 multiple choice questions.
Select the correct outcome for the code provided then click "Submit" to reveal the answers.

Questions

Question 1

print (“Hello, world!”)
Please select an answer

Question 2

foo = 200
print(foo)
Please select an answer

Question 3

myname = “Alex”
print (“Hello”, myname)
Please select an answer

Question 4

a = 14
b = 16
c = a + b
print(c)
Please select an answer

Question 5

a = 10
b = 5
c = 3
d = a + b * c
print(d)
Please select an answer

Question 6

a = 1
if a == 5:
    print(“a is 5”)
Please select an answer

Question 7

a = 1
while a <= 5:
    print(“a is”,a)
    a =+ 1
Please select an answer

Question 8

list = [2,4,6,8]
for a in list:
    print(“a is”, a)
Please select an answer