Question

Consider the code below. When it runs, if the user enters a valid integer at the first input() prompt, but an invalid floating point number for the second input prompt, which print() statements will display on the screen?
try:
intAnswer = int(input("Enter an integer: "))
print("Stage 1")
floatAnswer = float(input("Enter a floating point number: "))
print("Stage 2")
except:
print("OOPS")
Select one:

a.
"Stage 1" and "OOPS"


b.
"Stage 1" and "Stage 2"


c.
"Stage 1", "Stage 2" and "OOPS"


d.
"OOPS"

Answers

GPT 3.5
c. "Stage 1", "Stage 2" and "OOPS"