-
Notifications
You must be signed in to change notification settings - Fork 0
/
Guess_Number.py
70 lines (64 loc) · 1.96 KB
/
Guess_Number.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import numpy as np
x = np.random.randint(0, 1024)
y = int(input('Guess number '))
while y > x or y < x:
if y > x and y < 10000:
print('NO, NUMBER IS SMALLER')
y = int(input())
elif y < x:
print('NO, NUMBER IS BIGGER')
y = int(input())
elif y > 10000:
print('ARE YOU CRAZY?')
y = int(input())
else:
print('SUCCESS , THE NUMBER WAS = ',x)
==============================================
================ Unlock Game==================
==============================================
import numpy as np
x = np.random.randint(0, 9)
y = np.random.randint(0, 9)
z = np.random.randint(0, 9)
paswr = x**2,y**3,z**4
x1 = int(input('FIRST NUMBER = '))
y1 = int(input('SECOND NUMBER = '))
z1 = int(input('THIRD NUMBER = '))
unloc = x,y,z
i = 0
n = int(input(' NUMBERS OF TRY = '))
print('==============coding process==============')
while x!=x1 or y!=y1 or z!=z1:
i+=1
if x > x1:
print('Wrong pasword - ACCES DENIED-X-too SMALL')
x1 = int(input('FIRST NUMBER = '))
if y > y1:
print('Wrong pasword - ACCES DENIED-Y-too SMALL')
y1 = int(input('SECOND NUMBER = '))
if z > z1:
print('Wrong pasword - ACCES DENIED-Z-too SMALL')
z1 = int(input('THIRD NUMBER = '))
if x < x1:
print('Wrong pasword - ACCES DENIED-X-too BIG')
x1 = int(input('FIRST NUMBER = '))
if y < y1:
print('Wrong pasword - ACCES DENIED-Y-too BIG')
y1 = int(input('SECOND NUMBER = '))
if z < z1:
print('Wrong pasword - ACCES DENIED-Z-too BIG')
z1 = int(input('THIRD NUMBER = '))
if x == x1:
print('X IS CLEAR')
if y == y1:
print('Y IS CLEAR')
if z == z1:
print('Z IS CLEAR')
print('TRY NUMBER',i)
if i == n:
print('Game over - - - ')
print('You are lose chanses')
break
else:
if x==x1 and y == y1 and z == z1:
print('ACCES GRANTED-VICTORY = ',unlock,'Lives used = ', i,'/',n)