Exercise 1

Let's revisit the competition between our waiters in the prior chapter using conditional logic. If waiter A sold more special plates, assign True to waitera_win and print 'Waiter A wins!'. Otherwise, assign False to waitera_win and print 'Waiter B wins!'.

Use tonight, where waiter A sold 1 special and waiter B sold 5 specials as a test case.

Exercise 2

One night, both waiters sell the 3 specials, and yet the program declares: 'Waiter B Wins!'. Waiter A is furious. Implement some logic that prints 'It's a tie!' and assigns the value 'Tie' to waitera_win. Use this night as a test case.

Exercise 3

Recall that the waiters had a rule that if they tie on specials sold, the amount of tips they collected determined the winner. Implement this logic on a night where both sold 3 specials, while waiter A collected 100 dollars in tips and waiter B collected 80 dollars in tips. Don't forget to handle the case where they tie on tips collected as well!