Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Este prrograma calcula descontos
- # Elizeu Barbosa Abreu
- novo = True
- while novo == True:
- print('{:_^50}'.format('CALCULADORA DE DESCONTOS'))
- print('{:>50}'.format('OBS.: Use "." no lugar de ",". EX.: R$40.25'))
- valor_do_produto = float(input('\nValor do produto: R$'))
- desconto = float(input('Porcentagem de desconto: %'))
- valor_desconto = valor_do_produto*(desconto/100)
- total_pagar = (valor_do_produto-valor_desconto)
- print('{:_^40}'.format(''))
- print('O produto custava: R${:2.2f}\nDesconto: {:2.0f}%\nDesconto em dinheiro: R${:2.2f}\nValor a Pagar: R${:2.2f}'.format(valor_do_produto, desconto,valor_desconto,total_pagar))
- print('{:_^40}'.format(''))
- c = input('Deseja realizar novo Calculo:\nS para Sim | N para nao : ')
- if c == 's' or c == 'S':
- print('{:_^40}'.format(''))
- novo = True
- else:
- print('{:>50}'.format('Bye Bye'))
- novo = False
Add Comment
Please, Sign In to add comment