Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python TaskS GMU-Mobile, a new cell phone initiative by GMU, is offering three new cell phone plans to its students starting 2019. Your task is

image text in transcribed

python

TaskS GMU-Mobile, a new cell phone initiative by GMU, is offering three new cell phone plans to its students starting 2019. Your task is to help your friends decide which cell phone plan to purchase based on their monthly usage Refer to the table below to see a description of the monthly plans. Plan Cost Per Month (S) S15 S20 S25 Free Calls (minutes) 100 175 250 Free Texts 1000 1500 2000 Price for additional Price for additional calls per minute 1.50 1.25 text (S) 0.75 Basic Standard Premium 0.25 discount (age, major, is_in_military, gpa): First, we will check to see if a student gets a discount, given the student details. All the discounts are 20% of the overall monthly cost and are only for the basic plan. The Computer Science department is offering its students (exclusively for CS majors) the discount if their GPA is or above 3.5. Students in the military and senior citizens (age 65+), regardless of their major, receive the discount, Discounts cannot be stacked (i.e., a student gets a maximurn of 20% discount). Assume age is a non-negative int, major is a string, is_in_military is a bool, and gpa is a float. The answer is returned as a bool. Note that the string "cs" is not the same as "Computer Science discount (34, "Biology", True, 3.5) discount (35, "Biology", False, 3.5) discount (66, "Physics", False, 3.8) discount(21, "Computer Science",False, 3.6) discount (20, "cs", False, 3.7) True False True True False calculate_cost(plan, num_minutes, num text): Given the plan type, number of minutes, and number of text messages, calculate the cost. The answer is returned as a float. Assume plan is a string, and num minutes and num text are non-negative ints. Assume that the parameter plan is always given a valid choice: "basic", "standard", or "premium calculate cost("basic", 5, 180) calculate cost("basic", 103, 70e) calculate cost("standard, 182, 699)28.0 calculate_cost("standard", 180, 1000) 26.25 calculate cost("premiun",18, 1680) 15.0 19.5 25.0 cost efficient plan(age, major, is in military, gpa, num minutes, num text): Given the age, major, whether the student is in military, gpa, number of minutes, and number of text messages, determines which plan is the best. The answer is returned as a string. You will find the other two functions discount and calculate cost helpful in implementing this function. Tie-breaking: if the cost of any two plans are the same, choose the plan with more free minutes. Assume num minutes, num text, and age are non-negative ints, major is a string, is_in military is a bool, and gpa is a float. cost efficient plan(18, "Biology" False, 3.7, 5e, see) cost efficient plan (19, "Computer Science", False, 3.7, 185, 18) basic" cost efficient plan(19, "Computer Science" False, 3.5, 11e, 1ee0)standard" cost efficient plan(25, "Mechanical Engg True, 3., 178, 1see) standard" cost efficient plan(25, "Astronomy" False, 3.5, 260, 1se0) basic

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_2

Step: 3

blur-text-image_3

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

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions

Question

LO1 Explain how the workforce is changing in unpredicted ways.

Answered: 1 week ago

Question

LO6 List the components of job descriptions.

Answered: 1 week ago