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.
Interactive feature not available in single page view (see it in standard view).
Activity 8
Change the restaurant program (repeated below) so that it asks the user for the number of people.
Interactive feature not available in single page view (see it in standard view).
Next, in Section 6, you’ll learn a different form of iteration.