Tutorpip← About this lessonABCWith the answer keyDownload PDF
Coding · Ages 10+ · Set C
If in Python
Scan to mark
on screen
C
Name
Date
Start Finish
Goal: 15 min
Score/ 12
Remember: If runs lines only when a condition is true. Else runs when it is false.

Questions

1
Which idea about if and else is true?
🔁else runs when the condition is true↪️else runs when the condition is false♾️if runs its lines every time
2
The weather box holds rain and the coins box holds seven. Which condition has a bug?
🔤weather == "sun"🔤weather != "rain"🔤weather == rain
3
Which idea about if and else is not true?
↪️else runs when the condition is false❓if runs its lines only when the condition is true🔁else runs when the condition is true
4
The weather box holds rain and the coins box holds seven. Which condition has a bug?
🔤weather == "rain"🔤weather = "rain"🔤weather != "rain"
5
The weather box holds rain and the coins box holds seven. Which condition is true?
🔤coins == 7🔤weather != "rain"🔤coins < 5
6
Which idea about if and else is not true?
❓if runs its lines only when the condition is true🟰two equals signs ask whether two things are equal🎀pushing lines in is only to look neat
7
The weather box holds rain and the coins box holds seven. Which condition is true?
🔤weather != "sun"🔤coins < 5🔤weather != "rain"
8
The weather box holds rain and the coins box holds seven. Which condition is false?
🔤weather != "rain"🔤coins > 5🔤weather == rain
9
The weather box holds rain and the coins box holds seven. Which condition is false?
🔤weather == "sun"🔤weather == "rain"🔤weather = "rain"
10
Which idea about if and else is true?
one equals sign asks if two things are equal🔁else runs when the condition is true➡️the lines pushed in under if belong to the if
11
The weather box holds rain and the coins box holds seven. Which condition is false?
🔤weather = "rain"🔤weather == "rain"🔤coins >= 8
12
The weather box holds rain and the coins box holds seven. Which condition is true?
🔤weather != "rain"🔤coins > 5🔤coins < 5
Scan the code at the top to mark this sheet on screenTake a photo of your answers or type them. It is marked for you automatically, and your score is kept.