Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def menu():
- print 'Conversions Menu'
- print '[1] Miles to Kilometers';
- print '[2] Inches to Centermeters';
- Choice = input ('Enter your choice number: ');
- if (Choice == 1):
- K2M();
- elif (Choice == 2):
- IN2CM();
- else:
- print 'Invalid choice: ', choice;
- menu = input ('Type menu to return: ');
- if (menu == menu):
- menu();
- def K2M():
- Miles = input ('Enter Miles: ');
- Kilometers = Miles * 1.6;
- print Miles, 'Miles =', Kilometers, 'Kilometers';
- def IN2CM():
- Inches = input ('Enter Inches: ');
- Centermeters = Inches * 2.54;
- print Inches, 'Inches =', Centermeters, 'Centermeters';
Add Comment
Please, Sign In to add comment