Title | Self-Quiz Unit 2 |
---|---|
Author | Anas Saker |
Course | Programming 1 |
Institution | University of the People |
Pages | 5 |
File Size | 149 KB |
File Type | |
Total Downloads | 57 |
Total Views | 126 |
Self-Quiz Unit 2...
Anas Haj Sakor
Home My courses CS 1102 - AY2021-T4 15 April - 21 April Self-Quiz Unit 2
Started on State Completed on Time taken
Monday, 19 April 2021, 11:12 AM Finished Monday, 19 April 2021, 11:33 AM 20 mins 52 secs
Marks
4.00/5.00
Grade
80.00 out of 100.00
Question 1
Incorrect
Mark 0.00 out of 1.00
In a while loop, how many times does the continuation conditionrun? Select one: a. At least once, at the beginning of each iteration. b. At least once, at the end of each iteration. c. Exactly once. d. Zero or more times, at the beginning of each iteration. e. Zero or more times, at the end of each iteration.
Your answer is incorrect. See Section 3.4.1 of Eck (2014). The correct answer is: At least once, at the beginning of each iteration.
Question 2
Correct
Mark 1.00 out of 1.00
Consider the following block of Java code. How many times will it output "Hello"? for (int i = 1; i < 10; i++) { System.out.println("Hello"); } Select one: a. 0 b. 9 c. 1 d. 10 e. Way too many!
Your answer is correct. Notice that the condition is "i < 10", not "i...