NEW
Font size
WorksheetsSt Michael's - Year 8 - Python
Total questions: 39
Worksheet time: 20mins
What is the job of a While Loop?
To repeat a section of code as long as something is true.
To repeat a section of code as long as you are looking at the screen.
To run a piece of code once then check that everything worked correctly.
To run a section of code forever.
What is the problem in this program?
There is a missing " in section 2
There is a missing ) in section 2
There is a missing " in section 3
Nothing
What is the problem in this program?
You can't add numbers to 'Dave'
The total will be 5 which is too much
The program will ask you for your name but you can't write it in.
Nothing
What is the problem in this program?
Spelling mistake in section 5
Spelling mistake in section 4
Spelling mistake in section 3
Nothing
What is the problem in this program?
The program will ask you for your name but you can't write it in.
Spelling mistake in section 5
Spelling mistake in section 3
Nothing
What is the problem in this program?
The < is the wrong symbol in section 4
The () is the wrong symbol in section 1
The -1 is the wrong symbol in section 6
Nothing
The following error means what?
The word 'print' has been misspelled
The program should not have hello in speech marks
The last line of the program is running first (back to front)
The name of the file is wrong
The following error means what?
There is a spelling or punctuation mistake somewhere in the program.
The program will run fine but you need to press save.
It has spelled the word 'Syntax' wrong somewhere
Invalid program, this is when you write a different program's code in python.
The following error means what?
There is no variable named 'x'
The last line of the program is running first (back to front)
The name of the program is wrong so it won't run.
'x' can never be bigger than 1
The following error means what?
The user entered hello instead of a number
The user needed to write 'int' for the program to work
The user used the word 'string' and this made the program stop working
The name of the program is wrong so it wouldn't work.
What does this program do?
It prints the number 10
It prints the word "grapes"
It prints "grapes = 10"
It doesn't do anything
What does this program do?
It counts down from 10 and then says you died.
It says you died 10 times
It counts down from 10 and says you died 10 times
It doesn't do anything
What does this program do?
It will keep counting up until it says I've bought 100 things
It will keep counting up until it says I've bought 101 things
It will keep counting up until it says I've bought 99 things
It does not work because it has an error
What does this program do?
It will print out I like dogs 4 times
It will print out I like dogs 8 times
It will print out I like dogs 9 times
It will print out I like dogs 12 times
What does this program do?
It will ask you for your name then tell you they were expecting you
It will give you a name
It will call you 'name' and say they were expecting you
It won't work
