Advertisement
Guest User

FlyingMiles.py

a guest
Oct 21st, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.88 KB | None | 0 0
  1. lyst = ['0', '1', '2' ]
  2.  
  3.  
  4. print('Enter miles: ')
  5. miles = int(input())
  6.  
  7. print('Enter flights: ')
  8. flights = int(input())
  9.  
  10. total = miles * flights
  11. print("Total miles so far is: ", total)
  12.  
  13. var = input("Press 'Y' to enter another flight, or 'N' to stop.  ")
  14. while var == 'Y':
  15.     print('Enter miles: ')
  16.     miles = int(input())
  17.  
  18.     print('Enter flights: ')
  19.     flights = int(input())
  20.  
  21.     var = input("Press 'Y' to enter another flight, or 'N' to stop.  ")
  22.  
  23.     if var == 'N':
  24.         print("Miles so far - ", miles + miles)
  25.         print("Flights so far - ",flights + flights)
  26.     else:
  27.         print('Enter miles: ')
  28.         miles = int(input())
  29.  
  30.         print('Enter flights: ')
  31.         flights = int(input())
  32.  
  33.         total = miles * flights
  34.         print("Miles so far: ", total)
  35.  
  36.         var = input("Press 'Y' to enter another flight, or 'N' to stop.  ")
  37.     break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement