Conditional Constructs — Chapter Test

Answer all 5 questions, then submit. You need 60% to pass. Log in to save progress.

Question 1
Which construct chooses between TWO paths?
Aif-else
Ba loop
Ca comment
Dimport
Question 2
In switch-case, what does 'break' do?
Astarts the next case
Bstops the switch after a case runs
Cends the program
Drepeats the case
Question 3
If you FORGET break in a switch, what happens?
Aa syntax error
Bnothing runs
Cfall-through — the next cases also run
Dthe program ends
Question 4
Which runs when NO case matches in a switch?
Abreak
Bdefault
Ccase 0
Delse
Question 5
System.exit(0) is used to…
Astart a loop
Bread input
Cend the whole program normally
Dclear the screen