Upload code

This commit is contained in:
2025-01-20 19:40:14 +01:00
parent 71625e3e41
commit 07809d7d77
66 changed files with 8917 additions and 0 deletions

40
IO/Coinflip.py Executable file
View File

@@ -0,0 +1,40 @@
import random
st1 = 0
st2 = 0
st3 = 3
st2a = 0
anzahl = 0
go = 1
while go == 1:
zahl = random.randint(1,2)
if st1 == st2:
if st2a == st3:
go = 0
else:
anzahl += 1
st3 = st2
st2 = st1
st2a = st1
st1 = zahl
if zahl == 1:
print("K")
else:
print("N")
else:
anzahl += 1
st3 = st2
st2 = st1
st2a = st1
st1 = zahl
if zahl == 1:
print("K")
else:
print("N")
print("Took", anzahl, "tries")