|
@ -4,9 +4,10 @@ |
|
|
#author :Marcel Haazen |
|
|
#author :Marcel Haazen |
|
|
#email :marcel@haazen.xyz |
|
|
#email :marcel@haazen.xyz |
|
|
#date :23-09-2019 - 11:53 |
|
|
#date :23-09-2019 - 11:53 |
|
|
|
|
|
#edit_date :27-09-2019 - 23:25 |
|
|
#version :0.1 |
|
|
#version :0.1 |
|
|
#usage :python3 FA-1.py |
|
|
#usage :python3 FA-1.py |
|
|
#notes : |
|
|
|
|
|
|
|
|
#notes :Sorry als het wat gehaast is, en laat heb het snel gemaakt vanuit bed me bijholteontsteking dus wou het snel maken |
|
|
#python_version :3.7.4 |
|
|
#python_version :3.7.4 |
|
|
#============================================================================== |
|
|
#============================================================================== |
|
|
|
|
|
|
|
@ -24,6 +25,37 @@ def standaardtarief(afstandKM): |
|
|
price = round(afstandKM * 0.8, 2) |
|
|
price = round(afstandKM * 0.8, 2) |
|
|
return price |
|
|
return price |
|
|
|
|
|
|
|
|
ritprijs |
|
|
|
|
|
|
|
|
def ritprijs(leeftijd,weekendrit,afstandKM): |
|
|
|
|
|
basis = standaardtarief(afstandKM) |
|
|
|
|
|
if weekendrit == True: |
|
|
|
|
|
if leeftijd < 12 or leeftijd >= 65: |
|
|
|
|
|
prijs = basis*0.65 |
|
|
|
|
|
else: |
|
|
|
|
|
prijs = basis*0.6 |
|
|
|
|
|
else: |
|
|
|
|
|
if leeftijd < 12 or leeftijd >= 65: |
|
|
|
|
|
prijs = basis*0.7 |
|
|
|
|
|
else: |
|
|
|
|
|
prijs = basis |
|
|
|
|
|
return round(prijs,2) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print(ritprijs(11,True,14)) |
|
|
|
|
|
print(ritprijs(12,True,14)) |
|
|
|
|
|
print(ritprijs(64,True,14)) |
|
|
|
|
|
print(ritprijs(65,True,14)) |
|
|
|
|
|
|
|
|
|
|
|
print(ritprijs(11,False,14)) |
|
|
|
|
|
print(ritprijs(12,False,14)) |
|
|
|
|
|
print(ritprijs(64,False,14)) |
|
|
|
|
|
print(ritprijs(65,False,14)) |
|
|
|
|
|
|
|
|
|
|
|
print(ritprijs(11,True,51)) |
|
|
|
|
|
print(ritprijs(12,True,51)) |
|
|
|
|
|
print(ritprijs(64,True,51)) |
|
|
|
|
|
print(ritprijs(65,True,51)) |
|
|
|
|
|
|
|
|
print(standaardtarief(25)) |
|
|
|
|
|
|
|
|
print(ritprijs(11,False,51)) |
|
|
|
|
|
print(ritprijs(12,False,51)) |
|
|
|
|
|
print(ritprijs(64,False,51)) |
|
|
|
|
|
print(ritprijs(65,False,51)) |