Python :: Aufgabe #246 :: Lösung #3
5 Lösungen

#246
Preise im Copy-Shop für Kopien
Anfänger - Python
von DragStar
- 20.03.2020 um 11:53 Uhr
In einem Copy-Shop gilt folgende Preisliste:
01 - 49 Seiten kostet 0,10 Euro pro Seite
50 - 99 Seiten kostet 0,09 Euro pro Seite
100 - 199 Seiten kostet 0,08 Euro pro Seite
ab 200 Seiten kostet 0,06 Euro pro Seite
Erstellen Sie ein Programm, welches nach Eingabe der Anzahl der Kopien den Gesamtpreis ausgibt.
01 - 49 Seiten kostet 0,10 Euro pro Seite
50 - 99 Seiten kostet 0,09 Euro pro Seite
100 - 199 Seiten kostet 0,08 Euro pro Seite
ab 200 Seiten kostet 0,06 Euro pro Seite
Erstellen Sie ein Programm, welches nach Eingabe der Anzahl der Kopien den Gesamtpreis ausgibt.
#3

von Gisbert5020 (3120 Punkte)
- 08.04.2020 um 16:53 Uhr

anzahl=int(input("Geben Sie die Anzahl der Kopien ein: ")) if anzahl < 50: preis = anzahl * 0.1 elif anzahl < 100: preis = anzahl * 0.09 elif anzahl < 200: preis = anzahl * 0.08 else: preis = anzahl *0.06 print("Preis für ", anzahl, "Kopien ist ", preis, "€")
Kommentare:
Für diese Lösung gibt es noch keinen Kommentar
Seite 1 von 0
1