Advertisement
Guest User

Untitled

a guest
Jun 28th, 2012
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def displaymenu () :
  2. print ('1:' 'Convert Hour/s to Minute/s');
  3. print ('2:' 'Convert Minute/s to Hour/s');
  4.  
  5. def run():
  6. displaymenu ()
  7. int(input('Enter choice number:'))
  8. if (choice == 1):
  9. H2M()
  10. elif (choice == 2):
  11. M2H()
  12. else:
  13. print ('Invalid Choice: ')
  14. print ('Bye bye!'), choice;
  15.  
  16.  
  17. def H2M() :
  18. Hour = int(input('Enter your time in hours.'));
  19. Minutes = Hour * 60;
  20. print (Hour, 'Hour -', Minutes, 'Minutes')
  21.  
  22. def M2H() :
  23. Minutes = int(input('Enter your time in Minutes..'));
  24. Hours = Minutes / 60
  25. print (Minutes, 'Minutes-', Hours, 'Hours')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement