Make a choice
What does this program print? Choose an answer and how sure you are, then seal it.
Predict the output
Turn this pseudocode into Python: put the lines in order and indent them. One line is not needed. READ mark IF mark >= 70 THEN PRINT "A" ELSE IF mark >= 60 THEN PRINT "B" ELSE PRINT "Below B" ENDIF
Order the lines
A mark of 70 or more should print A, 60 to 69 should print B, and anything lower should print Below B. A mark of 70 prints the wrong grade. Tap the line at fault, then choose a fix.
Find the bug
Complete the grade program for the NUC bands: A 70-100, B 60-69, C 50-59, D 45-49, E 40-44, F 0-39. Choose what fills the gap.
Fill the gap
Read a year. Print leap if it is a leap year, and not leap if it is not. A year that divides by 4 is a leap year, except a year that divides by 100, which is a leap year only if it also divides by 400.
Write: runs your program
Which program does what the flowchart does, for every whole mark from 0 to 100?
Which program matches?
Tips
- Do the tasks in order the first time. Each one uses what the one before taught.
- Write tasks run your program. The others need only taps.