SHARE
TWEET

Untitled

a guest Dec 10th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Eingabe
  2.  
  3. buchungen = int(input("Bitte geben sie die Anzahl an Buchungen ein:"))
  4.  
  5. #Berechnung
  6. def rechnung():
  7.     if buchungen <=50:
  8.         betrag = buchungen * 0,1
  9.     if buchungen >50 and buchungen <=100:
  10.         betrag = (50 * 0.1) + (buchungen - 50) * 0.08
  11.     if buchungen >100 and buchungen <=150:
  12.         betrag = (50 * 0.1) + (50 * 0.08) + (buchungen - 100) * 0.06
  13.     if buchungen >150 and buchungen <= 200:
  14.         betrag = (50 * 0.1) + (50 * 0.08) + (50 * 0.06) + (buchungen - 150) * 0.04
  15.     if buchungen >200 and buchungen <= 250:
  16.         betrag = (50 * 0.1) + (50 * 0.08) + (50 * 0.06) + (50 * 0.04) + (buchungen - 200) * 0.02
  17.     if buchungen >250:
  18.         betrag = (50 * 0.1) + (50 * 0.08) + (50 * 0.06) + (50 * 0.04) + (50 * 0.02)
  19.     return betrag
  20.  
  21. betrag = rechnung()
  22. ergebnis = betrag + 4
  23.  
  24. #Ausgabe
  25.  
  26. print("Kontogebühren betragen: %.2f€" %betrag)
  27. print("inkl. Porto: %.2f€" %ergebnis)
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