Time Formatter

Step 3: Add a function to your code with a parameter for a string representing a number. Have this function return a string based on the following rules:
  • Number is blank: return two zeros
  • Number is 1 digit : return the number with a leading zero
  • Number is more than 1 digit: return the number
Hint: Use len() to get the length of a string.
Last step Next step