Initial import
This commit is contained in:
commit
dce41cf8c7
1 changed files with 25 additions and 0 deletions
25
main.py
Normal file
25
main.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
import random
|
||||
|
||||
|
||||
while True:
|
||||
random.seed()
|
||||
tal = random.randint(1, 100)
|
||||
brute_get = 0
|
||||
while True:
|
||||
y = input("get et tal mellem 1 og 100: ")
|
||||
x = int(y)
|
||||
brute_get += 1
|
||||
|
||||
if x == tal:
|
||||
print("tillyke du har vundet")
|
||||
print(f"du brute {brute_get} get")
|
||||
break
|
||||
|
||||
if tal > x:
|
||||
print("talet er støre end det")
|
||||
else:
|
||||
print("talet er mindre end det")
|
||||
|
||||
y = input("Vil du spille igen?")
|
||||
if y != "ja":
|
||||
break
|
Loading…
Reference in a new issue