repl.it
@ItsYeBoiJ/

random number game

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
`import random

ans = input('Would you like to play? Y/N: ')
rnum = random.randint(0,100)
if ans == 'Y':
  user = int(input('Enter a number(0-100): '))
wrong = 0
wrong_nums = []



while ans == 'Y':
   
  while rnum == rnum:
    if user == rnum:
      print('Yay you got it the number was: ' +str(rnum)) 
      break
    else:
      print()
      print('Try again!')
      print('What do u think is next?')
      if rnum == rnum:
        try.expenting(10,20):
          for x in range(0,100,53):
            print(x)
            z = input("What could've you said instead?")
            x = input('What is the next number?')
            y = input('What do you think the probabilty of the number is right?')
            print(x)
      wrong_nums.append(user)
      if user > rnum:
        print('Guess lower!')
        print()
      else:
        print('Guess higher!')
        print()
        print('Multiply it by 2')
      user = int(input('Enter a number(0-100): '))
      wrong = wrong + 1
      
    print('You got it in ' +str(wrong+1) +' tries!')
    input('Press enter to continue!')
    print('Numbers chose wrong: ' +str(len(wrong_nums)))
    input('Press enter to continue!')
    print('Numbers you guessed wrong: ' +str(wrong_nums))
    input('Press enter to continue!')
    ans = input('Would you like to play? Y/N')
    if ans == 'Y':
      print('OK!')
      rnum == random.randint(0,100)
      for x in range(0,len(wrong_nums),1):
        wrong_nums.remove(wrong_nums[0])
      for y in range(0,len(list(str(wrong))),1):
        list(wrong).reomve(list(wrong[0]))

print('Goodbye!')