Question: Lab Assignment For today's practice we are going to get practice writing functions. Specially we are going to write a program to do a handful

 Lab Assignment For today's practice we are going to get practice

Lab Assignment For today's practice we are going to get practice writing functions. Specially we are going to write a program to do a handful of time conversions You will need to write six functions to do conversions. Each of these functions should take 1 parameter the number of days and return the converted result: days2years: 1 year 365.25 days days2weeks: 1 week 7 days days2hours: 24 hours- 1 day days2minutes: 60 minutes -1 hour days2seconds: 60 seconds 1 minute days2milliseconds: 1000 milliseconds 1 second Notice some of these functions will need to call each other as they are not all in terms of days. You will also need to write two other functions. print_conversions: This function should call the six functions above in the order listed and print out the results followed by a space and the unit name. main: This function use the input statement to get number of days from the user then call the print_conversions function Example When given the input 1 The output should exactly match: days? 0.00278507811321013 ycars 0.14285711285711285 wcoks 24.0 hours 1440.0 minul.e duction to Programming home > 3.10: L3 - Lab zyBook LAB 3.10.1: L3 - Lab 0 10 main.py Load default template... 1 ## Write 6 functions for conversion 3 # write print-conversions S # Write main 7 # Make sure main gets called first 8 ifnane"main": 9 main) 18 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!