Which entry by the user will cause the program to halt with an error statement?

# Get a guess from the user and update the number of guesses.
guess = input("Guess an integer from 1 to 10: ")
guess = int(guess)

Multiple Choice
a. 22
b. 2.5
c. -1
d. 3

Respuesta :

Answer:

2.5

Explanation:

The program expects an integer input from the user. This is evident in the second line where the program attempts to convert the input from the user to an integer value.

Please note that the integer value could be negative or positive.

Options (a), (c) and (d) are integer values while option (b) is a floating point value.

Hence, option (c) will halt the program and raise an error because it is not an integer.