I love how straightforward you are and your voice is really soothing!
@ShogMain2 жыл бұрын
3:00 its int secretNum =7; int guess; do { coutguess; } while (secretNum != guess); cout
@briann.47312 жыл бұрын
hello mike this code runs on code blocks perfectly but then gives an error on vs studio.....since the guess variable need be initialized before the loop
@inovinoclaudine45145 жыл бұрын
👍Thumbs up for this video. I've learned about using loops for making a guessing game..
@OptimisedTutorials6 жыл бұрын
Great work, underrated.
@ur_frequency3 жыл бұрын
Excuse me I'm working to add an array in our game. I mean the we have to guess multiple numbers. I used array but failed. Sir can you help me in solving my problem.
@alexandrtcacenco81293 жыл бұрын
It works as long as I enter pure numbers, but as soon I enter few letters cin getting ignored and while loop goes infinite. How to sanitize input and ignore letters?
@nidhisethi31355 жыл бұрын
We didn't use endl in the code for guess game. Why then enter a guess statement is always in a new line when we enter a wrong guess?
@obst52285 жыл бұрын
I think it is because of the while loop. It is creating a new line every time it runs.
@edwinnavarro88814 жыл бұрын
Can i ask sir Dane? If i guess the number on first trial and i write a wrong number on the last trial, why the output tells wrong if i got already the number
@fessenic7 жыл бұрын
My pycharm isn't working well, do you recommend any other programming language for absolute beginners?
@GiraffeAcademy7 жыл бұрын
Sorry to hear pycharm is messing up. I wouldn't let that discourage you from learning python though. You could always try a different IDE, here's a list I found of some popular ones! noeticforce.com/best-python-ide-for-programmers-windows-and-mac Honestly python is a great first language to learn because the syntax is very intuitive and minimal, but really any language can be used to learn the basics. I would recommend javascript if you already know how to use HTML, or Java, which is extremely popular! Best of luck!
@fessenic7 жыл бұрын
Giraffe Academy thanks for your lovely response I can see you are really supportive and that's why I chose giraffe academy to learn python, also thanks for the IDE list you gave me it's a great post, thanks!
@kingbhau3064 жыл бұрын
Use VS code.
@prashantsonone7594 жыл бұрын
can we use for loop for this game
@avneetrandhawa62573 жыл бұрын
Sir can u help me with my assignment?please
@Drxxx3 жыл бұрын
cool tutorial
@that18285 жыл бұрын
Instead of a number if I have to enter a word or letter what do I do??
@thekub325 жыл бұрын
Define the variable as a string literal and then type it in quotes.
@aryanmore74954 жыл бұрын
good 👍👍👍
@Darksigma.7775 жыл бұрын
Bro thank you so much
@kasron2213 жыл бұрын
thanks!
@brambleberrycreekhomestead68835 жыл бұрын
Nice!
@moazibrahim25074 жыл бұрын
enjoyed !
@cristianmercado63264 жыл бұрын
7? Coincidence? 🤔
@glauciotech4 жыл бұрын
Obrigado While loop
@theactualljazzman8744 жыл бұрын
if you guess a letter the program goes ape shit, 10/10
@DonaldMurf3 жыл бұрын
try using cin.fail() if guess is an int and you use if(cin.fail()){} then you u can write some code in the block and loop them back to the start etc.
@abdulrhmanmagdy75912 жыл бұрын
#include #include using namespace std; int main() { int guess; const int secretnum=7; int countguesses=0; const int limit=3; bool outofguess=false; do { if(countguesses