uaveiro-leci/1ano/fp/aula03/ex07.py

9 lines
202 B
Python
Raw Normal View History

2022-10-11 19:27:51 +00:00
def tax(r):
if r <= 1000:
return 0.1 * r
if r <= 2000:
return 0.2 * r - 100
return 0.3 * r - 300
x = float(input('R? '))
print('O valor de tax(r) é: {:.3f}'.format(tax(x)))