Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Must be done in python3 In the Future Asha and Kelly like programming, but Asha practices more than Kelly. Not wanting to fall behind, Kelly

Must be done in python3

image text in transcribedimage text in transcribedimage text in transcribed

In the Future Asha and Kelly like programming, but Asha practices more than Kelly. Not wanting to fall behind, Kelly resolves to practice more. They each solve a number of problems in a day. Asha has already solved more problems than Kelly. What is the minimum number of days it will take for Kelly to have solved more problems than Asha? For example, if Asha is 5 problems ahead of Kelly and they solve 3 and 5 problems a day, Asha will be ahead by only 3 after the first day, 1 after the second, and Kelly will pass Asha on day 3 Function Description Complete the function minNum in the editor below. The function must return the minimum number of days needed by Kelly to exceed Asha, or-1 if it's impossible. minNum has the following parameter(s): A: Number of problems Asha solves in a day K: Number of problems Kelly solves in a day :Number of problems Asha is ahead to begin Constraints 1sAKs 100 OsPs100 Input Format For Custom Testing Input from stl be processed as follows and passed to the function. The first line contains an integer A. The second line contains an integer K The third line contains an integer P Sample Case 0 Sample Input 0 Sample Output 0 Explanation o Asha is 1 problem ahead of Kelly to begin. After 1 day passes, Kelly will have solved 5 problems while Asha will have only solved 13-4 problems. 1 #!/bin/python3.. 10 11 # 12 # complete the 'minNum 'function below. 13 14 # The function is expected to return an INTEGER. 15 # The function accepts following parameters: 16 # 1. INTEGER A 17 # 2. INTEGER K 18 # 3. INTEGER P 19 20 21 def minNum(A, K, P): # Write your code here 23 24if name-=' main

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

More Books

Students also viewed these Databases questions