Getting user input with input().
The input() function is how you make your Python programs interactive. It tells the computer to pause execution, wait for the user to type something on their keyboard, and hit the Enter key. Once the user hits Enter, the program takes whatever they typed and continues running. The Golden Rule of input() Everything typed into…