initial commit

This commit is contained in:
2025-10-01 10:46:21 +02:00
commit 50a55e19d6
138 changed files with 2037 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# -*- coding: ansi -*-
import random
einkauf = float(input("Bitte geben Sie die Einkaufssumme ein: "))
gewinne = (
[100] * 1 +
[50] * 2 +
[20] * 3 +
[10] * 5 +
[5] * 8 +
[0] * 10
)
gewinn_prozent = random.choice(gewinne)
zu_zahlen = einkauf * (100 - gewinn_prozent) / 100
# Ausgabe
print(f"Gl<EFBFBD>cksrad-Ergebnis: {gewinn_prozent}% Rabatt")
print(f"Urspr<EFBFBD>ngliche Summe: {einkauf:.2f} Euro")
print(f"Zu zahlende Summe: {zu_zahlen:.2f} Euro")