Please help.
I’ve finished writing and editing the commands but still can’t get through these tasks:
"1. When you run your script, you should prompt the user for a username with Enter your username:, and take a username as input. Your database should allow usernames that are 22 characters
2.If that username has been used before, it should print Welcome back, ! You have played <games_played> games, and your best game took <best_game> guesses., with being a users name from the database, <games_played> being the total number of games that user has played, and <best_game> being the fewest number of guesses it took that user to win the game
3.If the username has not been used before, you should print Welcome, ! It looks like this is your first time here.
4.The next line printed should be Guess the secret number between 1 and 1000: and input from the user should be read
5.Until they guess the secret number, it should print It’s lower than that, guess again: if the previous input was higher than the secret number, and It’s higher than that, guess again: if the previous input was lower than the secret number . Asking for input each time until they input the secret number.
6.If anything else than an integer is input as a guess, it should print That is not an integer, guess again:
7.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 "
Below is the link and image of my script file, please help me. Show me my mistake to fix.
Thank you for watching.
My code so far
Link my code: “LearningFreecodecamp/number_guess.sh at 934f97e13b3597a97afb682d01b2b097bac0d40b · NPhucBinh/LearningFreecodecamp · GitHub”
Link SQL and Code:
“LearningFreecodecamp/Relational Database (Beta)/database number_guess at main · NPhucBinh/LearningFreecodecamp · GitHub”
Below are pictures for the tasks that i am having trouble with
My browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
Challenge: Number Guessing Game - Build a Number Guessing Game
Link to the challenge: