Question: For the following activity, write the function that will convert time into seconds. You will use multiple functions from python to accomplish the conversion.

For the following activity, write the function that will convert time into 

For the following activity, write the function that will convert time into seconds. You will use multiple functions from python to accomplish the conversion. You shall not use any libraries or inbuilt tools. Also do not try searching google as you may end up wasting time. Just raise your hand and ask for help :) In [2] # Input is a type of String in the format --> 2:10:33 #2 is the hour mark, 10 is the minute mark and 33 seconds --> timeToSeconds ("2:10:33") should return 7866 def timeToSeconds (time): timeInSeconds = 0 return timeInSeconds Find largest difference in a list Given a list of Integer, return the difference between the largest and smallest integers in the list. Once again, raise your hand for any questions In [ ] #maxRange ([10, 15, 20, 2, 10, 6]) 18 #maxRange([3, 6, -9, -4, -2, 15]) 24 def maxRange(): difference = 0 return difference

Step by Step Solution

3.39 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 You can create a function timeToSeconds to convert a time string in the format 21033 into seconds ... View full answer

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 Programming Questions!