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 practicewriting functions. Specially we are going to write a program to doa handful of time conversions You will need to write six functions

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.0027378507871321013 years 0.14285714285714285 weeks 24.0 hours 1440.0 minutes 86400.0 seconds 86400000.0 milliseconds Load derauit template... 1 ## Write 6 functions for conversion 3 ##Write print-conversions 4 5 # Write main 7 # Make sure main gets called first 8 ifname "_main_" main) 9 mainD

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!