Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python3 (3) As Time Goes By with bugs Oh, no someone started trying to improve working code without making a copy of the working version

python3

(3) As Time Goes By with bugs Oh, no someone started trying to improve working code without making a copy of the working version first. Now function minutesToYears is not returning the correct result. Find and fix the bugs in minutesToYears and/or its auxiliary functions. The revised functions should work for all of the examples given in the docstrings. Comment any changes you make in the code. def minutesToHours(minutes): ''' (number) -> float convert input minutes to hours; return hours >>> minutesToHours(60) 1.0 >>> minutesToHours(90) 1.5 >>> minutesToHours(0) 0.0 ''' hours = minutes / 60 hours = round(hours, 2) print(hours) return None def hoursToDays(hours): ''' (number) -> float convert input hours to days; return days >>> hoursToDays(24) 1.0 >>> hoursToDays(100) 4.17 >>> hoursToDays(0) 0.0 ''' days = hours / 24 return days def daysToYears(days): ''' (number) -> float convert input days to years; return years >>> daysToYears(365) 1.0 >>> daysToYears(100) 0.27 >>> daysToYears(0) 0.0 ''' days = 365 years = days / 365 years = round(years, 2) return years def minutesToYears(m): ''' (int) -> float input number m minutes is converted to equivalent number of years. return years. call auxiliary functions to do each step. >>> minutesToYears(525600) 1.0 >>> minutesToYears(5256000) 10.0 >>> minutesToYears(394200) 0.75 >>> minutesToYears(0) 0.0 ''' minutesToHours(m) hoursToDays(h) daysToYears(d) return y

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

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions

Question

Effective Delivery Effective

Answered: 1 week ago