The higher lower Game using Python and Flask Server for local website
-
Create a new project in PyCharm called higher-lower, add a server.py file.
-
Create a new Flask application where the home route displays an
Alternatively use the one I found on Giphy: https://media.giphy.com/media/3o7aCSPqXE5C6T8tBC/giphy.gif
-
Generate a random number between 0 and 9 or any range of numbers of your choice.
-
Create a route that can detect the number entered by the user e.g "URL/3" or "URL/9" and checks that number against the generated random number. If the number is too low, tell the user it's too low, same with too high or if they found the correct number. try to make the
3 is too low:
7 is too high:
and 5 is just right:
Here are the GIF URLs I used, but it's way more fun finding your own on giphy.com
High: https://media.giphy.com/media/3o6ZtaO9BZHcOjmErm/giphy.gif
Low: https://media.giphy.com/media/jD4DwBtqPXRXa/giphy.gif
Correct: https://media.giphy.com/media/4T7e4DmcrP9du/giphy.gif