initial commit

This commit is contained in:
hoffmeisterda104361 committed 2026-10-19 20:29:13 +02:00
commit 39f56a3b10
83 files changed
+3583

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import random
def gamble():
counter = 0
print("in this game you have to guess a random number between 1 and 100")
target = int(random.randint(1,100))
while True:
guess = int(input("Take a guess! : "))
if target == guess:
print("You won!")
print("guesses taken: ",counter)
break
if target > guess:
print("too low")
if target < guess:
print("too high")
counter = counter+1
gamble()