id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

rmueller@lasacs.com > micro
prev  |  next  |  chance

A microwave accepts from 1 to 4 digits for the cook time. If the time entered is 1 or 2 digits, the time is interpreted as seconds. If the time entered is 3 or 4 digits, it is interpreted as MM:ss (i.e. minutes and seconds). The time entered is guaranteed to be between 1 and 9999. It is valid to enter values of 60 or more for each MM and ss. Return a string of the format "MM:ss" representing the cook time. For MM and ss values that are less than 10 use the value with a leading 0.


micro(60) → '01:00'
micro(99) → '01:39'
micro(100) → '01:00'

...Save, Compile, Run (ctrl-enter)

def micro(inTime):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 200

Copyright Nick Parlante 2017 - privacy