AshLaw96 / weather-wise

0 stars 0 forks source link

WEATHER WISE

GitHub commit activity GitHub last commit GitHub repo size


Weather Wise is a multiple choice weather quiz that users can play to help improve there knowledge about weather and is a fun game for all ages, so everyone can play.

When a user first opens the quiz it will show a menu with a title and a brief overview of what it actually is. Below this it will then show a list of options with what the user would like to do next. Depending on there choice it will either start the game, show the instructions on how to play the game or quit the game. If the user inputs an incorrect value they will then be informed that whatever they have just inputted was incorrect and they need to write either 1, 2 or 3 depending on there choice. With the first option been chosen, it will then ask the user what level of difficulty the user would like for example easy, medium or hard. Again if the user inputs an incorrect value it will tell them that they have done so and need to write either 1, 2 or 3. Following there choice it will then ask how many questions they would like to answer for example 10, 25 or 50. Once more if the user didn't type a correct value it will tell them so and that they need to type either 1, 2 or 3. After this the app will then access data from the questions library and start asking randomly chosen multiple choice questions up until the user has answered there desired amount, for example what is rain? a. god peeing b. condensation from clouds c. water squirting from plains d. water that falls from clouds in the sky, that happens when tiny water droplets in the clouds join together and become too heavy to stay in the air. Once again if the user doesn't input a, b, c or d for any question they will be told to write a correct value from the options given. When the quiz has been finished there score will be toted up and then shown to the user, then the user will be asked if they would like to play again or quit the game. If the user doesn't input a correct value again they will be informed of this and asked to input a correct value. Providing they have chosen a correct value it will either take them to the menu or show message saying thank you for playing, goodbye. However at the menu screen if the user inputted the second option the app will then show the user how to play the quiz and once they have read this it will ask if they want to play again. Finally if the user chose the last option it will then double check they want to quit and if they do show the thank you for playing, goodbye.

Deployed site: https://ui.dev/amiresponsive?url=https://weather-wise-project-e6ccd7a6b753.herokuapp.com

screenshot

source: amiresponsive


User Stories

New Site Users

Returning Site Users

Features

Existing Features

screenshot

screenshot

screenshot

Click here to view the difficulties Easy input ![screenshot](documentation/features) Medium input ![screenshot](documentation/features) Hard input ![screenshot](documentation/features)

screenshot

screenshot

screenshot

screenshot

screenshot

Click here to view the quit options Y/y input ![screenshot](documentation/features) N/n input ![screenshot](documentation/features)

screenshot

screenshot

screenshot

screenshot

Click here to view the finished game options option 1 ![screenshot](documentation/features) option 2 ![screenshot](documentation/features)
Click here to view the finish error options Error 1 ![screenshot](documentation/features) Error 2 ![screenshot](documentation/features)

Future Features

  1. Allow users to play split-screen or multiplayer.
  2. Add a leaderboard to save users high score.
  3. Add links to other quizzes or cool facts about weather.

Tools & Technologies Used

Data Model

Flowchart

To follow best practice, a flowchart was created for the app's logic, and mapped out before coding began using a free version of Draw.io.

Below is the flowchart of the main process of this Python program. It shows the entire cycle of the program.

screenshot

Classes & Functions

The program uses classes as a blueprint for the project's objects (OOP). This allows for the object to be reusable.

🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑-START OF NOTES (to be deleted)

class Person:
    """ Insert docstring comments here """
    def __init__(self, name, age, health, inventory):
        self.name = name
        self.age = age
        self.health = health
        self.inventory = inventory

The primary functions used on this application are:

🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑-END OF NOTES (to be deleted)

Imports

I've used the following Python packages and/or external imported packages.

Testing

[!NOTE]
For all testing, please refer to the TESTING.md file.

Deployment

Code Institute has provided a template to display the terminal view of this backend application in a modern web browser. This is to improve the accessibility of the project to others.

The live deployed application can be found deployed on Heroku.

Heroku Deployment

This project uses Heroku, a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud.

Deployment steps are as follows, after account setup:

Heroku needs three additional files in order to deploy properly.

You can install this project's requirements (where applicable) using:

If you have your own packages that have been installed, then the requirements file needs updated using:

The Procfile can be created with the following command:

The runtime.txt file needs to know which Python version you're using:

  1. type: python3 --version in the terminal.
  2. in the runtime.txt file, add your Python version:
    • python-3.9.19

For Heroku deployment, follow these steps to connect your own GitHub repository to the newly created app:

Either:

Or:

The frontend terminal should now be connected and deployed to Heroku!

Local Deployment

This project can be cloned or forked in order to make a local copy on your own system.

For either method, you will need to install any applicable packages found within the requirements.txt file.

If using any confidential credentials, such as CREDS.json or env.py data, these will need to be manually added to your own newly created project as well.

Cloning

You can clone the repository by following these steps:

  1. Go to the GitHub repository
  2. Locate the Code button above the list of files and click it
  3. Select if you prefer to clone using HTTPS, SSH, or GitHub CLI and click the copy button to copy the URL to your clipboard
  4. Open Git Bash or Terminal
  5. Change the current working directory to the one where you want the cloned directory
  6. In your IDE Terminal, type the following command to clone my repository:
    • git clone https://github.com/AshLaw96/weather-wise.git
  7. Press Enter to create your local clone.

Alternatively, if using Gitpod, you can click below to create your own workspace using this repository.

Open in Gitpod

Please note that in order to directly open the project in Gitpod, you need to have the browser extension installed. A tutorial on how to do that can be found here.

Forking

By forking the GitHub Repository, we make a copy of the original repository on our GitHub account to view and/or make changes without affecting the original owner's repository. You can fork this repository by using the following steps:

  1. Log in to GitHub and locate the GitHub Repository
  2. At the top of the Repository (not top of page) just above the "Settings" Button on the menu, locate the "Fork" Button.
  3. Once clicked, you should now have a copy of the original repository in your own GitHub account!

Local VS Deployment

No differences were found between the local version and the live deployed version of the program.

Credits

Source Location Notes
Markdown Builder README and TESTING tool to help generate the Markdown files
YouTube PP3 terminal tutorial for adding color to the Python terminal
Chatgpt question.py used to generate randomly made multiple choice questions

Media

Source Location Type Notes
Audio Micro game page audio free audio files to generate the game sounds
TinyPNG entire site image tool for image compression

Acknowledgements