TDT4109/Exercise 2/8 - Billettpriser og rabatter/task8a.py

15 lines
426 B
Python
Raw Normal View History

2020-09-16 15:01:12 +02:00
try:
from common.inputChecking.typeCheck import inputTypeCheck
except ModuleNotFoundError:
print('Sjekk README.md for hvilke flagg python trenger')
exit(1)
2020-09-07 13:52:12 +02:00
def evalPrice(daysToTrip):
2020-09-16 15:01:12 +02:00
return 'Du kan få minipris: 199,-' if (
daysToTrip >= 14) else 'For sent for minipris; fullpris 440,-'
2020-09-07 13:52:12 +02:00
2020-09-16 15:01:12 +02:00
if __name__ == "__main__":
daysToTrip = inputTypeCheck('Dager til du skal reise? ', int)
print(evalPrice(daysToTrip))