16 questions
What is another word for 'iteration'?
Repetition
Selection
Iteration
What is the output of the following code?
count
0,1,2,3,4,5,6,7,8,9
How many times will this loop run?
10
4
I want to allow the program to repeatedly ask the user to enter their guess if it does not equal the answer...Which option do I use?
while guess == answer:
guess=input()
while guess != answer:
guess=input()
I want to print "Password matched" if the user enters the correct password, otherwise allow them to try again. What is wrong with the code above?
The last line should be outside the loop
A For loop needed to be used
What is the advantage of using a while loop versus a for loop?
You can repeat the code continuously
There is a pre-defined number of repetitions
!= means 'does not equal'
True
False
Which statement is not true about variables
Used to store data
Have a unique name
Can only store 1 piece of data at a time
Tests if a value is true or false
You would use an String to store 4.67
True
False
Which type of data will be stored?
String
Integer
Float
Boolean
Which type of data will be stored?
String
Integer
Float
Boolean
What does this error mean?
You have left out a character
You have named your variable wrong
You have a space where it shouldn't be
What does this error mean?
You have left out a character
You have named your variable wrong
You have a space where it shouldn't be
What does this error mean?
You have left out a character
You have named your variable wrong
You have a space where it shouldn't be