Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://winhost.cic.pt/ip/logged/concurso.aspx/url
- q=int(input())
- preço=int(input())
- cor=input()
- preçot=q*preço
- if(q>=5):
- desconto=10
- td=preçot*(desconto/100)
- d=preçot-td
- print("A PAGAR:","{0:.2f}".format(d))
- print("DESCONTO:","{0:.2f}".format(td))
- if(q<5 and cor=="VERMELHA"):
- desconto=5
- td=preçot*5/100
- d=preçot-td
- print("A PAGAR:","{0:.2f}".format(d))
- print("DESCONTO:","{0:.2f}".format(td))
- if(q<=5 and cor=="AZUL"):
- desconto=0
- print("A PAGAR:","{0:.2f}".format(preçot))
- print("DESCONTO:","{0:.2f}".format(desconto))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement