SHARE
TWEET

Untitled

jpvieiraa Mar 16th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. http://winhost.cic.pt/ip/logged/sub.aspx?idex=6aef265a-e931-4243-846e-c65a68138463
  2.  
  3. q=int(input())
  4. preço=int(input())
  5. cor=input()
  6. preçot=q*preço
  7. if(q>=5):
  8.     desconto=10
  9.     td=preçot*(desconto/100)
  10.     d=preçot-td
  11.     print("A PAGAR:","{0:.2f}".format(d))
  12.     print("DESCONTO:","{0:.2f}".format(td))
  13. if(q<5 and cor=="VERMELHA"):
  14.     desconto=5
  15.     td=preçot*5/100
  16.     d=preçot-td
  17.     print("A PAGAR:","{0:.2f}".format(d))
  18.     print("DESCONTO:","{0:.2f}".format(td))
  19.    
  20. if(q<=5 and cor=="AZUL"):
  21.     desconto=0
  22.     print("A PAGAR:","{0:.2f}".format(preçot))
  23.     print("DESCONTO:","{0:.2f}".format(desconto))
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