5.2 A conversion function
The solution is to use the built-in function int that takes a string and converts it to an integer, which is a number like –2, –1, 0, 1, 2, etc. If the string represents a decimal number, int will give an error.
Change the restaurant program (repeated below) so that it asks the user for the number of people.
Next, in Section 6, you’ll learn a different form of iteration..