top of page

My first successful game other than chess and Rubiks cube

Heres a game which guesses the number I have and tells with as many guesses as possible

a=2 import random n=0 ha=1 while ha==1: b=random.sample((1,2,4,3),1) n=n+1 print(b[0],n) if(b[0]==2): ha=0 print(ha) print('The random won in n monves ',n)

================== RESTART: C:/Users/haris/Desktop/game.py ================== 1 1 4 2 4 3 3 4 3 5 1 6 4 7 4 8 4 9 4 10 4 11 1 12 3 13 1 14 3 15 3 16 1 17 4 18 3 19 1 20 3 21 1 22 3 23 4 24 2 25 0 The random won in n monves 25 >>> ================== RESTART: C:/Users/haris/Desktop/game.py ================== 1 1 4 2 2 3 0 The random won in n monves 3 >>> ================== RESTART: C:/Users/haris/Desktop/game.py ================== 2 1 0 The random won in n monves 1 >>> ================== RESTART: C:/Users/haris/Desktop/game.py ================== 1 1 1 2 3 3 4 4 2 5 0 The random won in n monves 5 >>> ================== RESTART: C:/Users/haris/Desktop/game.py ================== 3 1 1 2 2 3 0 The random won in n monves 3


 
 
 

Recent Posts

See All
Maze solver question making app in gmaps

[3/13, 12:29 PM] Harish Exinc: Hi folks honestly after doing flood fill algorithm with paper I want to pick up a name of a shop on road and play flood fill however the destination isn't marketed perfe

 
 
 
Should have solved maze in 2000

Got Harry Potter 4 in 2000 and should have solved in windows computer with floodfill Google.. and demoed in House to cricket lawn in 2000..

 
 
 
Better human maze solver

[3/11, 4:25 AM] Harish Teach: I must have made floodfillopillo maze solving video from ganga hostel entrance to swimming pool.. with a twig in 2010 when I first learned it.. or in caltech hostel to s

 
 
 

Comments


bottom of page