WorksheetsSt Michael's - Year 8 - Small Basic - MIDTERM
Total questions: 6
Worksheet time: 3mins
Name
Class
Date
1.
What piece of code decides what the smallest number that will be printed out is?
a)
lives = 0
b)
while lives < 6
c)
lives = lives + 1
d)
endwhile
2.
What piece of code decides what the biggest number that will be printed out is?
a)
lives = 0
b)
while lives < 6
c)
lives = lives + 1
d)
endwhile
3.
What piece of code ends the while loop?
a)
lives = 0
b)
while lives < 6
c)
lives = lives + 1
d)
endwhile
4.
What piece of code prints the number of lives?
a)
lives = 0
b)
while lives < 6
c)
lives = lives + 1
d)
textwindow.writeline(lives)
5.
What piece of code adds one to lives?
a)
lives = 0
b)
while lives < 6
c)
lives = lives + 1
d)
textwindow.writeline(lives)
6.
What piece of code asks if lives is smaller than another number?
a)
lives = 0
b)
while lives < 6
c)
lives = lives + 1
d)
textwindow.writeline(lives)
100 %
