DAY 8
1

# 練習1

``````A. animal = input('Enter your favorite animal:')

B. if animal.lower() == animal:
print(animal, 'is all lower case.')

C. else: print(animal, 'is mixed case.')

D. if animal.lower == animal:
print(animal, 'is all lower case.')

E. elif animal.upper() == animal:
print(animal, 'is all upper case.')

F. elif animal.upper == animal:
print(animal, 'is all upper case.')
``````

# 練習2

``````if income >= 540000:
if income >= 4530000:
income_tax = income * 0.4
elif income >= 2420000:
income_tax = income * 0.3
elif income >= 1210000:
income_tax = income * 0.2
else:
income_tax = income * 0.12
else:
income_tax = 0
``````

(1) 當今年收入到達多少便要開始徵收所得稅？
A. 4530000
B. 2420000
C. 1210000
D. 540000

(2) 若今年收入為4500000，所得稅為幾%？
A. 40%
B. 30%
C. 20%
D. 12%

# 練習3

• 消費滿1500元，獲得50元折價券
• 消費滿2000元，獲得100元折價券
• 消費滿2500元，獲得150元折價券
``````___(1)___
___(2)___
discount = 150
elif purchase_amount >= 2000:
discount = 100
else:
discount = 50
___(3)___
``````

(1)
A. else:discount = 0
B. if purchase_amount >= 1500:
C. if purchase_amount >= 2500:

(2)
A. else:discount = 0
B. if purchase_amount >= 1500:
C. if purchase_amount >= 2500:

(3)
A. else:discount = 0
B. if purchase_amount >= 1500:
C. if purchase_amount >= 2500: