SHARE
TWEET

Untitled

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