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

15 lines
426 B
Python

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