SHARE
TWEET

Untitled

jpvieiraa Mar 19th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. q=int(input())
  2. preço=int(input())
  3. cor=input()
  4. preçot=q*preço
  5. if(q>=5):
  6.     desconto=10
  7.     td=preçot*(desconto/100)
  8.     d=preçot-td
  9.     print("A PAGAR:","{0:.2f}".format(d))
  10.     print("DESCONTO:","{0:.2f}".format(td))
  11. if(q<5 and cor=="VERMELHA"):
  12.     desconto=5
  13.     td=preçot*5/100
  14.     d=preçot-td
  15.     print("A PAGAR:","{0:.2f}".format(d))
  16.     print("DESCONTO:","{0:.2f}".format(td))
  17.    
  18. if(q<=5 and cor=="AZUL"):
  19.     desconto=0
  20.     print("A PAGAR:","{0:.2f}".format(preçot))
  21.     print("DESCONTO:","{0:.2f}".format(desconto))
  22.  
  23.  
  24. http://winhost.cic.pt/ip/logged/sub.aspx?idex=6aef265a-e931-4243-846e-c65a68138463
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top