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

20 lines
630 B
Python

try:
from common.inputChecking.boolInput import boolInput
from common.inputChecking.typeCheck import inputTypeCheck
except ModuleNotFoundError:
print('Sjekk README.md for hvilke flagg python trenger')
exit(1)
def miniPriceBranch():
choseMiniPrice = boolInput('Minipris 199,- kan ikke refunderes/endres\nØnskes dette (J/N)? ')
print('Takk for pengene, god reise!' if choseMiniPrice else 'Da tilbyr vi fullpris: 440,-')
if __name__ == "__main__":
daysToTrip = inputTypeCheck('Dager til du skal reise? ', int)
if daysToTrip >= 14:
miniPriceBranch()
else:
print('For sent for minipris; fullpris 440,-')