Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please solve it throught PYTHON!!!! Thanks!!! GMU-Mobile, a new cell phone initiative by GMU, is offering three new cell phone plans to its students starting
please solve it throught PYTHON!!!! Thanks!!!
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 Free Calls (minutes) 100 175 250 Price for additiona Price for additional calls per minute (S) text (S) Texts 1000 1500 2000 0.75 0.5 Standard Premium 1.25 $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 (ie., a student gets a maximum 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", 50, 100) calculate_cost( basic", 103, 700) calculate_cost("standard", 102, 699) +20.0 calculate_cost("standard", 18, 1000)26.25 calculate_cost( premium", 18e, 160 25.0 15.0 19.5 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, 50, 500) cost efficient_plan(19, "Computer Science", False, 3.7, 105, 100) "basic "basic" cost efficient plan(19, "Computer Science" False, 3.5, 11e, 1000) "tandard" cost efficient plan(25, "Mechanical Engg", True, 3.8, 178, 1500)"standard" cost_efficient_plan (25, "Astronomy" False, 3.5, 260, 158e) "premiumStep 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