Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- import time
- def num_float():
- first_num = float(raw_input("please enter a time in hh:mm format"))
- first_num_int = int(first_num) ##the first time
- first_minitus = (first_num - first_num_int)*100 ##first time minitues
- second_number = float(raw_input("please enter number of minutes to add"))
- new_number = (first_num_int*60) + int(first_minitus) + int(second_number) #total minitus
- new_hour = (int(new_number/60)) ##hour after adding
- new_minit = int(((float(new_number)/60) - int(new_number/60)) *60) #minit after adding
- new_time = str(new_hour) + (".") + str (int(new_minit)) ##total time
- print "the new time is " + new_time
- time.sleep(10)
- while 1==1:
- num_float()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement