nerdexam
Python_Institute

PCEP-30-02 · Question #379

How many hashes (#) does the code output to the screen? ``python floor = 10 while floor != 0: floor //= 4 print("#", end="") ``

The correct answer is C. five. See the full explanation below for the reasoning.

Question

How many hashes (#) does the code output to the screen?
floor = 10
while floor != 0:
 floor //= 4
 print("#", end="")

Options

  • Aone
  • Bzero (the code outputs nothing)
  • Cfive
  • Dthree

How the community answered

(39 responses)
  • A
    8% (3)
  • B
    5% (2)
  • C
    72% (28)
  • D
    15% (6)

Community Discussion

No community discussion yet for this question.

Full PCEP-30-02 Practice