Python Practice: Number Guessing Game with While Loops & If Statements

preview_player
Показать описание
Basic game using Python 3 that allows user to guess a random number and find out how many tries it took.
Рекомендации по теме
Комментарии
Автор

I appreciate the vid bro saved my life

themagnificentorange
Автор

Thank you so much, this solution helped me a lot!

awesomeshudti
Автор

how do i add points system in this?
like if the guess is low then subtract 10 points
and if guess is high then subtract 20 points
and if guess is right add 100 points
if the player initially has 100 points.

PaakhiMishraBEC
Автор

Hello, great video! I would like to ask you if it will be ok if I put the Guesses counter directly below while loop, so it will be counted every round and then I don’t need to repeat it below if and elif statement ?And why does guesses =1 in the beginning of project and not zero ?I’m a beginner so sorry for long questions..Thanks

marioz
Автор

hi! I've followed your codes exactly and somehow Im stuck in either "you guessed to high or low" loop. I even input -1 and 101 but the loop doesn't end! help!

syazanaizzatyramlan
Автор

I want to give player 3 chances and everytime they get it wrong a different print statement appairs but in a sequence.
For example you are given a choice A B or C if you choose A it would print "Blacksheep" and if you choose B print "Seriously". and vice versa.But with string and not integer.
Like if you chose B first it would say "Blacksheep" and "Seriously" second.
How can I do this?

KrAyOnS
Автор

how do you let the user pick the range?

rogerhillman
Автор

Hi I have a query
If I have only 4 attempts to guess the number, if I haven't guessed the number within the given attempt then how should I write the code. Can you please help me on this. I'm a beginner to Python programming.

jincyjoy
Автор

What if I type nothing in the output, what can I solve this

hsuhfuisah
Автор

hello @ Techbiz. I really enjoyed your video. I've made my code the same as yours for the guessing game. However sometimes mine's falls into an infinite loop. Why is that? To be honest my code has one exception to it.... it's guess number range is between 322, 355. Can you help please? I know I'm super late to the video but any help would be greatly appreciated. thanks

mori
Автор

Hey I want to create a number guesser game using arrays. So if the user didnt guess the number the program will give an array with random number and one of those number is the correct one. How can I do this?

Nonamelife
Автор

im making a rock, paper scissor game.. i am a beginner. i am trying to add a score to my program but it doesnt work as im not using a while loop (i am using the def main procedure) to start my game again. im getting a load of syntax errors because my score keeper is outside my main. im putting in the question "Do you want to start again?". if i say yes it starts again but the score counter stays the same whether or not you or the computer wins. it doesnt let me put the score variable outside the def main loop. i dont entirely understand the video. who could help me?

mg_
Автор

Hello @Techbiz. i want to know how to make it my number is 1-100 may give the answer in replied

Causily
Автор

how do i lessen the tries of playing like ex they can only guess 3 times

blustalker
Автор

it keeps portraying more guesses than what i guessed. i copied your exact code expect i made a maxrange instead of 100. it usually prints more guesses than what i actually guessed

alianaleonte
Автор

Why don't you have to specify that "guess" must equal "number" in order for the print ("Congratulations...") to be displayed?

maxpalmerdigital