QuestionQ240

VerifiedControl Flow – Conditional Blocks and Loops

Which line should be inserted in the code snippet below to produce the expected output?

Expected output:

Question Image

Code:

Question Image

Explanation

break immediately terminates the enclosing for loop when the current character is @. Because the character is checked before print(ch, end=""), the output stops after adam_smit.

Community Discussion

No comments yet. Be the first to start the discussion!