Relational Databases: Build a Number Guessing Game

Hi there,

Please I need help again!
I have worked on this lesson, " Build a Number Guessing Game" and passed all the test except TWO(02) tests which are failing. I have tested the code and bash script and I think everything is working find but the tests are not passing as shown in screenshot below. Here is the snapshot of the code:

https://gitpod.io#snapshot/49cb3cf8-f765-42ab-985e-03c881a09e94

Another error has occurred when I tried to push my repository to github. I get the following error:

error: remote unpack failed: index-pack failed
To Billjay65/guessing_game · GitHub
! [remote rejected] main → main (failed)
error: failed to push som refs to 'Billjay65/guessing_game · GitHub

This is my first time I am encountering this type of error too.

Help me resolve these issues. Here are the screenshots of all the issues:

Hi @Billjay

Why is the secret number appearing after each guess?
What happens when you enter invalid input, such as abc?

Please send a screenshot of your tables.
Do they correctly store player data?

Happy coding

Hello Teller,
I displayed the secret number for TESTING PURPOSES only. If not I will not be able to run this test below. Since I will have a very large amount of times to try:

" When the secret number is guessed, your script should print You guessed it in <number_of_guesses> tries. The secret number was <secret_number>. Nice job! and finish running"

Here is the screenshot which shows my database tables with data saved when I successfully run the bash script. On the left, you have the tables and on the right, you have the execution of the script. Please checkout all the details of my issues I have stated above especially git and github errors. Also checkout the number_guess.sh file in the snapshot I have shared above to see all the code.

Thanks

Hi @Billjay

I’d remove the secret number from the display. It may interfere with the tests.

Did you try abc as a guess?

I have removed the secret number and all the tests have passed. Thanks for solving the first part of the problem.

The error which persist is that with git and github. Help me resolve this error shown in the screenshot below.

error: remote unpack failed: index-pack failed
To Billjay65/guessing_game · GitHub
! [remote rejected] main → main (failed)

error: failed to push som refs to 'Billjay65/guessing_game · GitHub

Hi @Billjay

Here is a recent post regarding an issue with the relational database courses.

For this project you are not required to push changes to GitHub.

Happy coding

Hi @Teller,

Okay, but here is the instruction in the screenshot below asking for github repo.

What should I do now? Should I ignore the instruction?

Another issue is that only STEP 1 is marked as complete for this project. Step 2 is not completed since I have not submitted a solution link.

Can I submit the link to the public github repository i created which does not contain any files? The push operation was unsuccessful, so the repo is empty.

Hi @Billjay

The instructions on how to create the file dump should be in the Gitpod workspace.
You just need the .sql and .sh files saved in the repository.

Copy the script contents then paste them into the repo.
Make sure to use the same file names from the fCC page.

Happy coding