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

9 lines
202 B
Python
Executable File

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)))