Answer to Question #240721 in Python for Jhun

Question #240721

Write a program for Horizon Phones, a provider of cellular phone service. Prompt a user for maximum monthly values for talk minutes used, text messages sent, and gigabytes of data used, and then recommend the best plan for the customer's needs. A customer who needs fewer than 500 minutes of talk and no text or data should accept Plan A at $49 per month. A customer who needs fewer than 500 minutes of talk and any text messages should accept Plan B at $55 per month. A customer who needs 500 or more minutes of talk and no data should accept either Plan C for up to 100 text messages at $61 per month or Plan D for 100 text messages or more at $70 per month. A customer who needs any data should accept Plan E for up to 2 gigabytes at $79 or Plan F for 2 gigabytes or more at $87.



1
Expert's answer
2021-09-22T23:45:10-0400
minutes = int(input('Enter maximum monthly talk minutes: '))
sms = int(input('Enter maximum monthly text messages: '))
gigs = int(input('Enter maximum monthly gigabytes: '))
if gigs:
    if gigs > 2:
        print('The best plan for you: Plan F, $87/month')
    else:
        print('The best plan for you: Plan E, $79/month')
elif minutes > 500:
    if sms > 100:
        print('The best plan for you: Plan D, $70/month')
    else:
        print('The best plan for you: Plan C, $61/month')
elif sms:
    print('The best plan for you: Plan B, $55/month')
else:
    print('The best plan for you: Plan A, $49/month')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS