repl.it
@aurora_Rod/

ep110972

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import random

print("Welcome to the Super Guessing Game!")

repeat = "y"
while(repeat == "y"):
    print("(1) Level 1")
    print("(2) Level 2")
    print("(3) Level 3")
    print("(4) Level 4")
    print("(5) Level 5")
    
    level = int(input("Choses your difficulty (1-5): "))
    cpu = random.randint(1, level * 20)


    player = 0
    attempt = 0
    while(player != cpu):
  
      player = int(input("Guess a number between 1-" + str(20*level)))
      attempt+= 0
      if(player > cpu):
        print("The number you guess is to hight")
        print("Guess lower")
      elif(player < cpu):
        print("Guess highter!")
      else:
        print("you guess the right number!")
        print("The number is: " + cpu)
        print("The numbers of attempts:" + str (attempt))
    
    repeat = input("Do you want to play again? (y/n")
print("Thank you come againe")
Fetching token
?