Number Guessing Game - Build a Number Guessing Game

Tell us what’s happening:
Describe your issue in detail here.

Hello to everyone.

I am stuck on the final project because I can’t pass all the tests that belong to the script, I’m sure that my script is doing everything asked for, except for the " If anything other than an integer is input as a guess, it should print That is not an integer, guess again:" (but I know what to modify).

I drop my GitHub repo with the script and the database dump. I would appreciate any help.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.52

Challenge: Number Guessing Game - Build a Number Guessing Game

Link to the challenge:

I think the main issue is how user input is handled. Try printing the text and reading input in separate lines.
Also are you sure the instructions require user name to have at least 22 letters?

Thanks for your help, I’ll be trying that. Honestly, I’m not sure, I didn’t fully understand that task so I looked if someone had that issue and I found that that is the way they solved it.

Okey so I did what you suggested and nothing. Even I solved the integer comprobation issue and still doesn’t check any of those tasks.

Also uploaded the new changes to the github repo.

Your database should allow usernames of at least 22 characters

This means usernames with 22 characters should be accepted, but it doesn’t mean usernames has to have 22 or more characters.

Hey! Thanks a lot for your help, I’m not english native as you see. The changes you suggested checked all the tasks except for two of them:



Do you know what could be happening? The output that my script gives is the same that the task is asking for.

Also I updated the code on my github repo.

Take a look at the example game I tried:

Enter your username:
me

Welcome, me! It looks like this is your first time here.

Guess the secret number between 1 and 1000: 
500

It's higher than that, guess again: 
750

It's lower than that, guess again: 
675

It's lower than that, guess again: 
600

It's lower than that, guess again: 
550

It's lower than that, guess again: 
525

It's lower than that, guess again: 
513

It's higher than that, guess again: 
519

It's lower than that, guess again: 
516

It's higher than that, guess again: 
518

You guessed it in 9 tries. The secret number was 518. Nice job!

I’m counting here 10 attempts, but script writes 9.

2 Likes

Thanks you very much, I could complete all the tasks. I don’t know why I didn’t checked the number of guesses.

Now, to get my first fcc certificate.

So using varchar(22) is fine?

Another reason for failure to pass is having empty variables or not using variables.