Week 5 Quiz
Sign in to Google to save your progress. Learn more
For this week's lecture, we looked at loops. Which of the following is NOT a loop?
Clear selection
The do-while loop enforces one additional function as compared to the while loop. Which of the following best describes this function?
Clear selection
Using a loop, we can run code within a loop several times without the need to replicate the code. Which of the following for loop implementation will run for 10 times?
Assume that integer i has already been declared beforehand
Clear selection
Image 1
Image 1
How many times will the above code iterate?
Assume that integer i has already been declared and initialised to 0.
Clear selection
Last week, the "break" keyword was introduced. This week, it was highlighted again for using in loops. What does the "break" implementation do in a loop?
Clear selection
This week the "continue" keyword was introduced. What does the "continue" do within the loop?
Clear selection
Image 2
Image 2
In most programs, we try to prevent our logic from creating infinite loops as it can impede the general flow of our code. During the implementation of the code above, will the loop iterate infinitely?
Assume that iAmHandsome is an integer
Clear selection
Next
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy