Python_Institute
PCEP-30-02 · Question #316
Which one of the lines should you put in the snippet below to match the expected output? Expected output: adam_smit Code: ``python for ch in "[email protected]": if ch == "@": # insert code here…
The correct answer is A. break. See the full explanation below for the reasoning.
Question
Which one of the lines should you put in the snippet below to match the expected output? Expected output:
adam_smit
Code:
for ch in "[email protected]":
if ch == "@":
# insert code here
print(ch, end="")
Options
- Abreak
- Bcontinue
- Cexit
- Dprint()
How the community answered
(24 responses)- A79% (19)
- B4% (1)
- C4% (1)
- D13% (3)
Community Discussion
No community discussion yet for this question.