0% found this document useful (0 votes)
6 views

Source Code

The document describes a program that calculates toll fees and discounts for buses entering different zones. It collects information about bus owners, registration numbers, entry counts and zones. Based on the bus size and entry amounts, it calculates toll fees, applies discounts and displays the total amount due.

Uploaded by

Sonia Omapersaud
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Source Code

The document describes a program that calculates toll fees and discounts for buses entering different zones. It collects information about bus owners, registration numbers, entry counts and zones. Based on the bus size and entry amounts, it calculates toll fees, applies discounts and displays the total amount due.

Uploaded by

Sonia Omapersaud
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

# Author: [insert your name] Date: 2023-11-22

Counter1 = 0

Counter2 = 0

Counter3 = 0

Counter4 = 0

Counter5 = 0

Counter6 = 0

Counter7 = 0

Counter8 = 0

Counter9 = 0

Toll_Fees = 0

TotalDue = 0

Flat_Fee = 1000

Entry_Cost = 100

Entry_Rate = 1.5

DiscountRate1 = 0.12

DiscountRate2 = 0.05

print()

N = input('Specify the number of buses in the District. ')

print()

print('----------------------------------------------------------------------------------')

print(' WELCOME TO BENAB BUS')

print(' TERMINAL SOFTWARE')

print('----------------------------------------------------------------------------------')

print(

for x in range (int(N)):

print()

BusOwner = input('What is the name of the Bus owner? ')


Bus_Reg = input('What is the registration number of the bus: ')

Entries = int(input('Enter the number of entries counted for the bus: '))

print()

print()

print('----------------------------------------------------------------------')

print(' The Number 1 represents the zone ............ Molsen Creek')

print(' The Number 2 represents the zone ............ Corriverton')

print(' The Number 3 represents the zone ............ Clonebrook')

print(' The Number 4 represents the zone ............ Babylon')

print(' The Number 5 represents the zone ............ Blackbush')

print(' The Number 6 represents the zone ............ Adventure')

print(' The Number 7 represents the zone ............ Rose Hall')

print(' The Number 8 represents the zone ............ Albion')

print(' The Number 9 represents the zone ............ New Amsterdam')

print('----------------------------------------------------------------------')

print()

Terminal_Zone = input('Select the name of the Bus zone by entering the numbers 1-9. ')

if int(Terminal_Zone) == 1:

Counter1 = Counter1 + 1

elif int(Terminal_Zone) == 2:

Counter2 = Counter2 + 1

elif int(Terminal_Zone) == 3:

Counter3 = Counter3 + 1

elif int(Terminal_Zone) == 4:

Counter4 = Counter4 + 1

elif int(Terminal_Zone) == 5:

Counter5 = Counter5 + 1

elif int(Terminal_Zone) == 6:
Counter6 = Counter6 + 1

elif int(Terminal_Zone) == 7:

Counter7 = Counter7 + 1

elif int(Terminal_Zone) == 8:

Counter8 = Counter8 + 1

elif int(Terminal_Zone) == 9:

Counter9 = Counter9 + 1

print()

print()

print('-------------------------------------------------------------------------------')

print(' The Number 1 represents ........ The Bus capacity: 15 and entries made: >=150')

print(' The Number 2 represents ........ The Bus capacity: 50 and entries made: >=150')

print(' The Number 3 represents ........ The Bus capacity: 15 and entries made: < 150')

print(' The Number 4 represents ........ The Bus capacity: 50 and entries made: < 150')

print('-------------------------------------------------------------------------------')

Entry_Capacity = int(input('Choose the capacity & entry range by entering the nos. 1 - 4:
'))

if int(Entry_Capacity) == 1:

print('----------------------------------------------------------------------')

print('The owner of the 15 Seater Bus %s' %BusOwner)

print('Registration No. of bus %s' %Bus_Reg)

Toll_Fees = Entry_Cost * Entries

Discount = DiscountRate1 * Toll_Fees

Total_Due = (Flat_Fee + Toll_Fees)-Discount

print('Amount of Toll Fees collected: $%.2f'%Toll_Fees)

print('Discount given: $%.2f'%Discount)

print('The total amount to be paid by the Bus owner: $%.2f'%Total_Due)

print('----------------------------------------------------------------------')
if int(Entry_Capacity) == 2:

print('----------------------------------------------------------------------')

print('The owner of the 50 Seater Bus %s' %BusOwner)

print('Registration No. of bus %s' %Bus_Reg)

Toll_Fees = Entry_Rate * Entry_Cost * Entries

Discount = DiscountRate1 * Toll_Fees

Total_Due = (Flat_Fee + Toll_Fees)-Discount

print('Amount of Toll Fees collected: $%.2f'%Toll_Fees)

print('Discount given: $%.2f'%Discount)

print('The total amount to be paid by the Bus owner: $%.2f'%Total_Due)

print('----------------------------------------------------------------------')

elif int(Entry_Capacity) == 3:

print('----------------------------------------------------------------------')

print('The owner of the 15 Seater Bus %s' %BusOwner)

print('Registration No. of bus %s' %Bus_Reg)

Toll_Fees = Entry_Cost * Entries

Discount = DiscountRate2 * Toll_Fees

Total_Due = (Flat_Fee + Toll_Fees)-Discount

print('Amount of Toll Fees collected: $%.2f'%Toll_Fees)

print('Discount given: $%.2f'%Discount)

print('The total amount to be paid by the Bus owner: $%.2f'%Total_Due)

print('----------------------------------------------------------------------')

elif int(Entry_Capacity) == 4:

print('----------------------------------------------------------------------')

print('The owner of the 50 Seater Bus %s' %BusOwner)

print('Registration No. of bus %s' %Bus_Reg)

Toll_Fees = Entry_Rate * Entry_Cost * Entries

Discount = DiscountRate2 * Toll_Fees


Total_Due = (Flat_Fee + Toll_Fees)-Discount

print('Amount of Toll Fees collected: $%.2f'%Toll_Fees)

print('Discount given: $%.2f'%Discount)

print('The total amount to be paid by the Bus owner: $%.2f'%Total_Due)

print('----------------------------------------------------------------------')

print('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^')

print('Total No. of Buses that are attached to Zone 1: %i' %Counter1)

print('Total No. of Buses that are attached to Zone 2: %i' %Counter2)

print('Total No. of Buses that are attached to Zone 3: %i' %Counter3)

print('Total No. of Buses that are attached to Zone 4: %i' %Counter4)

print('Total No. of Buses that are attached to Zone 5: %i' %Counter5)

print('Total No. of Buses that are attached to Zone 6: %i' %Counter6)

print('Total No. of Buses that are attached to Zone 7: %i' %Counter7)

print('Total No. of Buses that are attached to Zone 8: %i' %Counter8)

print('Total No. of Buses that are attached to Zone 9: %i' %Counter9)

print('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^')

print()

print('Created by [insert your name] 2023-11-22')

You might also like