Advertisement
Guest User

mphtokm.py

a guest
Aug 4th, 2016
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. def mile(km):
  2. mile = km * 0.62137
  3. print("%d km inseamna %d mile" % (km, mile))
  4.  
  5. def km(mile):
  6. km = mile / 0.62137
  7. print("%d mile inseamna %d km" % (mile, km))
  8. def principal():
  9. meniu = int(input("1. Km To Miles\n2. Miles to Km\n: "))
  10. if meniu == 1:
  11. kilometri = int(input("Km: "))
  12. mile(kilometri)
  13. elif meniu == 2:
  14. mile = int(input("Mile: "))
  15. km(mile)
  16. if __name__ == "__main__":
  17. principal()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement