Why are you using
You can do without the
random
and not binary search?(Jun-29-2018, 04:00 PM)Zombie_Programming Wrote:while num2 != num: .... else: print('Computer guessed correctly') break
You can do without the
else
clause - and print the message after the loop
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.