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

17 lines
538 B
Python

from task9a import mainBranch
from task9b import fritidsboligBranch, secondaryHouseBranch, safeQuestion
choices = ['egen bolig', 'sekundærbolig', 'fritidsbolig']
choices.extend([choice.capitalize() for choice in choices])
choice = safeQuestion(
question=
'Skriv inn hustype for skatteutregning (egen bolig, sekundærbolig, fritidsbolig): ',
choices=choices)
if choice in ['egen bolig', 'Egen bolig']:
mainBranch()
elif choice in ['sekundærbolig', 'Sekundærbolig']:
secondaryHouseBranch()
else:
fritidsboligBranch()