Python Week 2 Quiz

How do we make code part of an if statement's body?
Use curly braces {}
Use indentation
Use endif
Use break
What is result of this boolean expression?

10 >= 10
True
False
What is the result of this boolean expression?
 
10 < 10
True
False
What is the result of this boolean expression?
 
"fred" == "Fred"
True
False
What is the result of this boolean expression?
 
"pqr" < "abc"
True
False
What will this print?
 
count = 3
 
while count >= 0:
  print(count)
  count = count - 1
Infinite loop, prints "3"
Prints "3", then "2", then "1", then "0"
Prints "3", then "2", then "1"
Prints "3" 3 times
What will this print?
 
count = 0
while True:
  print("a")
  if count >= 0:
    break
  count = count + 1
  print("b")
"a"
"a" then "b"
"a" then "b" then "a" then "b"
Inifinite loop, prints "a" then "b"
What will this print?
 
hour = 10
minute = 30
 
 
if minute < 60 and hour < 10:
  print("x")
elif minute <= 30 and hour <= 10:
  print("y")
else:
  print("z")
"x"
"y"
"z"
{"name":"Python Week 2 Quiz", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"How do we make code part of an if statement's body?, What is result of this boolean expression?10 >= 10, What is the result of this boolean expression?   10 < 10","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker