nerdexam
GIAC

GPYC · Question #12

Review the following Python 3 code. while True: try: n = input("Enter a number: ") n = int(n) break except ValueError: print("Not an integer") print("Thank you")

The correct answer is A. 539. You've hit your limit · resets 1pm (America/New_York)

Python Fundamentals & Command Line Tools

Question

Review the following Python 3 code. while True: try: n = input("Enter a number: ") n = int(n) break except ValueError: print("Not an integer") print("Thank you")

Options

  • A539
  • B4a6e
  • C(52-4)
  • Dthree

How the community answered

(42 responses)
  • A
    83% (35)
  • B
    7% (3)
  • C
    7% (3)
  • D
    2% (1)

Explanation

You've hit your limit · resets 1pm (America/New_York)

Topics

#try/except#input validation#type conversion#while loop

Community Discussion

No community discussion yet for this question.

Full GPYC Practice