Question
Must be in Python. Please provide screen shot Lab: The Food Tiger supermarket wants to reward it's best customer of the day by displaying his/her
Must be in Python. Please provide screen shot
Lab:
The Food Tiger supermarket wants to reward it's best customer of the day by displaying his/her name on a screen in the store. Your program should repeatedly input a sale amount followed by a customer name until the user enters -1 for the sale amount. Each sale amount and customer name should be placed into a tuple and appended to a list of sales. Design a function called best_customer that takes a list of tuples as a parameter.best_customer should determine which tuple has the highest sale amount and return the name associated with it.
Sample Execution 1 Welcome to Food Tiger Please enter a sale amount 15 Please enter a customer name: Alice Please enter a sale amount: 8.5 Please enter a customer name: Bob Please enter a sale amount 14.95 Please enter a customer name: Charles Please enter a sale amount: -1 The best customer of the day was Alice! Sample Execution 2 Welcome to Food Tiger Please enter a sale amount 16 Please enter a customer name: Alice Please enter a sale amount: 25 Please enter a customer name Bob Please enter a sale amount 36 Please enter a customer name: Charles Please enter a sale amount: 45 Please enter a customer name: David Please enter a sale amount -1 The best customer of the day was DavidStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started