Question: Activity 7: In most of the Python programs, you will want to interact with the user by the user inputs. For example, people int input(How

Activity 7: In most of the Python programs, you will want to interact with the user by the user inputs. For example, people int input("How many people are there?")) This line of code would work as long as the user enters an integer. However, some input, such as doesn't make sense for the number of people. You program should validate the user input before execute the rest of the code. Test the following program with different inputs import sys # import sys module so that we can use sys.extOto terminate the execution people-int(input("How many people are there?")) if people
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
