Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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 David

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions