QuestionQ223

VerifiedControl Flow – Conditional Blocks and Loops

How many hash (#) characters does the code display on the screen?

Question Image

Explanation

The loop condition is false at initialization because floor equals 0, so no loop iterations occur. The else clause associated with the while statement executes and prints a single # character.

Community Discussion

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