Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Function name:supportRally ( ) Parameters: percent of decided students who support your idea (float), percent of total students who are undecided (float), desired_level(str) Returns:string or

image text in transcribed

Function name:supportRally ( ) Parameters: percent of decided students who support your idea (float), percent of total students who are undecided (float), desired_level(str) Returns:string or float Description: College is looking for a way to make its campus more sustainable. You've come up with the idea to introduce reusable containers at West campus. Some students support your idea while others are undecided. You will hold a rally to gain the support of undecided students to reach an ideal support level. Write a function that takes in the percentage of decided students that support your idea (float), the percentage of students that are undecided (float), and the desired support percentage you want to reach (str). All of the undecided students will go to the rally. Assume the support levels are the following: 'Outstanding support >= 90.0 Significant support' >= 80.0 'Moderate support' >= 70.0 Return the float value of the minimum percentage of students at the rally you need to convince in order to achieve your desired support level rounded to 2 decimal places. If achieving the desired level of support requires a percent surpassing 100.0, return Not possible'. Test Cases: ## With 93% percent of the decided student body already supporting you, you need to convince 84.89% of the 37% of students that are undecided in order to reach the 90.0% total support level. >>> supportRally (0.93, 0.37, 'Outstanding support'). 84.89 ## With 70.2% percent of the decided student body already supporting you, it is not possible to reach the 80.0% total support level with only 15.4% of students being undecided. >>> supportRally (0.702, 0.154, 'Significant support') 'Not Possible

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

Students also viewed these Databases questions

Question

Effective Delivery Effective

Answered: 1 week ago