write a function switch stay that asks the user if they want to switch to the remaining door or stay with their original choice. catch any errors and continue asking for input until the user inputs a valid choice.

Respuesta :

Python's built-in input() function is known for always returning an object of the str(string) class.  

How do you get integer input from user in Python?

  • Python's built-in int() function, we must type cast inputs that are integers before utilizing them.
  • You must use the int() function to turn the user input into an integer before you can utilize them as integers.
  • For instance, age=int("What is your age?") As long as the user enters an integer, this piece of code should function properly.
  • In Python, the input() and print() functions are used to receive input from users and produce output that is displayed on the screen.
  • Users can supply the application with any information in the form of texts or numbers by using the input() function.
  • It is displayed on the screen through the print() function. In the command line, the user must press the enter key.
  • After that, the string you entered is sent to your application.
  • Therefore, you may use the function input(), which accepts an input string to print, to obtain a text value.

To Learn more About  built-in input() function Refer to:

https://brainly.com/question/28875510

#SPJ4