Read this little program before you run it:
if 8 < 3 then 40 else 60
What value does it give back?
Read this little program before you run it: if 7 > 5 then 10 else 20. What value does it give back?
You open a short program a classmate wrote. What should you do first?
Someone wrote this line: if 3 = 4 then "yes" else "no". Without running it, what does it produce?
Here is another short program:
if false then "yes" else "no"
What kind of value does it give back?
Program: if true then 5 else 8. What kind of value does it give back?
Program: if score >= 50 then "pass" else "retry". The pass mark must rise from 50 to 60. Which part must change?
Read this program a classmate wrote:
if speed > 30 then "slow down" else "ok"
The limit must drop from 30 to 25. Which part of the line must change?
Read before running: if "cat" = "dog" then 1 else 0. What does it give back, and why?
Read this program before running it:
if "sun" = "sun" then 1 else 0
What does it give back, and why?