Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Making a clock that works on different time.
- def seconds(time_string, from_seconds_in_minute):
- """This will change the minutes and seconds into seconds:
- The following parameters are:
- :param time_string:
- :param from_seconds_in_minute:
- :return: representation of minutes and seconds in seconds
- """
- m, s = time_string.split(':')
- if s <= '60':
- return int(m) * from_seconds_in_minute + int(s)
- def convert(time_string, from_seconds_in_minute, to_seconds_in_minute):
- """This function will be dealing with the following:
- Changing to 60 metric system into a different system.
- :param time_string:
- :param from_seconds_in_minute:
- :param to_seconds_in_minute:
- :return:
- """
- return 1
- if __name__ == '__main__':
- print(seconds("14:25", 50))
- print(convert("12:12", 20, 30)) # = > "08:12"
- print(convert("03:40", 60, 3)) # = > "73:01"
- print(convert("00:01", 60, 60))
- print(convert("03:61", 60, 3))
- print(convert("00:00", 60, 3))
- print(convert("03:61", 60, 3))
- print(convert("03:61", 60, 3))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement