Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python program that display s the points earned for a given customer . The program should prompt for the customer name, miles flown

Write a Python program that displays the points earned for a given customer. The program should prompt for the customer name, miles flown, and status level. The program will then display customer name and points earned. After processing the data, the program should ask if the user wants to process data for another flyer, and repeat the process if the answer is y. Program execution should continue for any number of customers until anything other than y is entered when asked if another flyer should be processed. The program should validate the miles entered(must be non-negative), and the status level label (Silver, Gold, or Platinum).
why cant I get rid of the red underline? Any tips to make my program work ? :(
Thank you! image text in transcribed
5 def pass_details(): name = input("Please enter customer name:") miles = input("Please enter miles travelled :") status = input("Please enter status level:") 6 7 8 9 LC 1 12 13 14 15 16 17 18 19 20 bif status == "Silver": r = miles * 1 print(name + "earned" + r + points) Delif status == "Gold": r = miles * 1.5 print(name + "earned" + r + points") Delif status == "Platinum": r = miles * 2 print(name + "earned" + r + points else: print("wrong status") 21 22 print("Process another customer?(Enter Y for Yes):") 23 24 if input == 'Y': print('pass_details(p)') 25 26

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

(1 point) Calculate 3 sin x cos x dx.

Answered: 1 week ago

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago