Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """
- Transport Type Calculator
- Author : Daniel Herrmann
- """
- number_of_people = input("How many people are you taking? : ")
- passengers = int(number_of_people)
- import math
- shuttle_capacity = 20
- van_capacity = 9
- car_capacity = 4
- bike_capacity = 1
- number_of_shuttles = round(passengers//shuttle_capacity)
- remainder = passengers%shuttle_capacity
- number_of_vans = round(remainder//van_capacity)
- remainder = remainder%van_capacity
- number_of_cars = round(remainder//car_capacity)
- remainder = remainder%car_capacity
- number_of_bikes = round(remainder//bike_capacity)
- remainder = remainder%bike_capacity
- price = number_of_shuttles * 85 + number_of_vans * 45 + number_of_cars * 25 + number_of_bikes * 15
- print("Number of people: ", passengers)
- print()
- print("You will need:")
- print()
- print("===================================")
- print("Shuttles: ", number_of_shuttles)
- print("Vans: ", number_of_vans)
- print("Cars: ", number_of_cars)
- print("Motorcycles: ", number_of_bikes)
- print()
- print("price :$",price)
- print("===================================")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement