Think Python X3
Revision as of 19:52, 13 October 2008 by Michael Murtaugh (talk | contribs)
Exercise X3.1
Recall the previous exercise about calculating time codes from an SRT file. Write a function that takes hours, minutes, seconds, and fraction as parameters and returns the raw number of seconds.
Hint: Start with your python expression from the previous exercise; replace "hard-coded" numbers with variables for each for the parameters listed above. Wrap this new expression inside a function defintion, with the given parameters, and remember to use the return keyword to pass the result back out when the function gets called.