From 088e7e695bfb618d593159eeade5f0e2f5f843dd Mon Sep 17 00:00:00 2001 From: "folke.leonard.broder.zantz" Date: Thu, 4 Dec 2025 21:55:24 +0100 Subject: [PATCH] test --- test.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 test.py diff --git a/test.py b/test.py new file mode 100644 index 0000000..1be78ea --- /dev/null +++ b/test.py @@ -0,0 +1,33 @@ +#import menu +import random + +propability = 40 +coins_per_head = 0.5 +coins = 5 +coins_amount = 1 +multiplier = 0.5 + +def coin_flip(propability, coins, coins_per_head, coins_amount, multiplier): + while True: + result = random.randint(0, 100) + if result in range(0,propability): + print(f'Kopf ({coins_amount}x)') + coins_amount += 1 #Anzahl an hintereinander geworfenen "Köpfen" + if coins_amount >=3: + coins_per_head += multiplier #Coin-Boost für mehrfaches werfen von Kopf hintereinander + else: + coins_per_head = 0.5 + coins += coins_per_head + print('') + print(f'Du hast {coins} Coins (+ {coins_per_head})') + input() + elif result in range(propability,100): + print('Zahl') + coins_amount = 1 + input() + + +coin_flip(propability, coins, coins_per_head, coins_amount, multiplier) + +print('Linus' \ +'') \ No newline at end of file