Skip to content

morphatic/grade-calculator-python

Repository files navigation

Grade Calculator Challenge

A library of functions designed to manipulate grades for a variety of scenarios.

The goal of this challenge is to give you a realistic example of what it's like to work as part of a programming team. It is common in industry for a team to develop a set of unit tests for a code library and then have the team members collaborate on writing the actual code for the functions.

Instructions

  1. Fork this repository (here's a good tutorial!)
  2. Clone your forked version of the repo to your computer, i.e. in your dev folder
  3. Open up the project in VSCode, and open up the terminal within VSCode
  4. From the terminal, initialize a new python virtual environment from the command line, i.e. python3 -m venv venv
  5. Activate that environment, source ./venv/bin/activate (OSX/Linux) or source ./venv/Scripts/activate (Windows)
  6. Use requirements.txt to install the same packages that I used, pip install -r requirements.txt
  7. Run the tests by typing pytest from the command line. If for some reason you get a message saying no tests were found, try deactivating (i.e. deactivate on the command line) your virtual environment, reactivating it the same way you did in step 5, and then running the tests again
  8. Examine both the tests in grade_calculator_test.py and the function stubs in grade_calculator.py (a "stub" is placeholder for a function that hasn't been written yet)
  9. Complete the functions in such a way that you can make all of the tests pass. You may add additional tests if you'd like, but DO NOT CHANGE THE EXISTING TESTS!
  10. If you don't want to keep having to type pytest after every change you make, you can instead type ptw from the command line and it will automatically re-run your tests every time you save any file in the directory. To get it to stop, hit the [ctrl] + [c] keys.
  11. Once the tests have passed, take a screenshot of the results proving your tests pass and add that image to your repo
  12. Update your README.md file to include your thoughts/reflections on what you learned, and also the screenshot
  13. Use git to add, commit, and push your finished changes up to your GitHub repo

In a "real life" scenario, the next step would be to submit a pull request so that the changes you made could be merged back into the main repo that you originally forked. This is the exact process followed in most open source software projects. Anyone who wants to can fork the main repo, make enhancements/bug-fixes, and then contribute the code they wrote back to the community.

Good luck!!!

About

A library of functions designed to manipulate grades for a variety of scenarios.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages