Python Project 4 - Guess the Number Game (Beginner)

preview_player
Показать описание
Programming the Guess the Number Game in Python 3.

Thanks for watching!
Рекомендации по теме
Комментарии
Автор

Thank you, needed this! Doing BA computer science this year LMAO!

Squiderrant
Автор

Use this formula. Start half way between 1 and the max number. (so, 1 to 100, guess = 50) If 50 is too high, you have halved the number of possible answers. (it is now between 1 and 25). So, your guess should then be 12. Say 12 is too low... now between 12 and 25, so 18... using this method you should be able to guess any number between 1 and ANYTHING within 8 tries. So, take that and reverse the game. The program could guess YOUR number in 8 tries or less.

AndrewErwin
Автор

I'm new to programming I was just wondering if you could loop this?

rspown
Автор

great helped a lot man, but i have a problem, i want mine to have infinite tries untill the user gets the answer right, but when i run the program the program ends after one try.. why?

TheAj