SHARE
TWEET

Untitled

a guest Jun 15th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. percentage = float(input("Porcentaje: %"))
  2. of = float(input("De: "))
  3.  
  4. try:
  5.     if percentage == 1:
  6.         print(of * 0.01)
  7.  
  8.     elif percentage == 2:
  9.         print(of * 0.02)
  10.  
  11.     elif percentage == 3:
  12.         print(of * 0.03)
  13.  
  14.     elif percentage == 4:
  15.         print(of * 0.04)
  16.  
  17.     elif percentage == 5:
  18.         print(of * 0.05)
  19.  
  20.     elif percentage == 6:
  21.         print(of * 0.06)
  22.  
  23.     elif percentage == 7:
  24.         print(of * 0.07)
  25.  
  26.     elif percentage == 8:
  27.         print(of * 0.08)
  28.  
  29.     elif percentage == 9:
  30.         print(of * 0.09)
  31.  
  32.     elif percentage == 10:
  33.         print(of * 0.1)
  34.  
  35. except:
  36.     print("Error")
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