I am going to write code in this condition:
I have a number in my mind and the code is going to find out, I have wrote it but it has a problem in while loop
if the guess from code is bigger I will reply 'b' or smaller :'k' and for the correct answer 'd'
I have a number in my mind and the code is going to find out, I have wrote it but it has a problem in while loop
if the guess from code is bigger I will reply 'b' or smaller :'k' and for the correct answer 'd'
import random x = 1 y = 99 guess= random.randint(x,y) print(guess) results = input() print(results) while results != 'd': break print ('wooow , computer you did it! ') if results == 'b': guess= random.randint(guess,y) print (guess) results = input() elif results == 'k': guess= random.randint(x,guess) print (guess) results = input()