TDT4109/Exercise 2/9 - Skatteetaten/task9c.py

22 lines
610 B
Python

try:
from common.inputChecking.choiceInput import choiceInput
except ModuleNotFoundError:
print('Sjekk README.md for hvilke flagg python trenger')
exit(1)
from task9a import mainBranch
from task9b import fritidsboligBranch, secondaryHouseBranch
if __name__ == "__main__":
choices = ['egen bolig', 'sekundærbolig', 'fritidsbolig']
choice = choiceInput(
prompt=f'Skriv inn hustype for skatteutregning ({", ".join(choices)}): ',
choices=choices)
if choice == 'egen bolig':
mainBranch()
elif choice == 'sekundærbolig':
secondaryHouseBranch()
else:
fritidsboligBranch()