This commit is contained in:
2025-12-04 21:55:24 +01:00
parent 91ccae348b
commit 088e7e695b

33
test.py Normal file
View File

@@ -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' \
'')