Static-Void-Academy / M0_C7

Repository with prompt and code for Module 0, Challenge 7: Employee Database

Home Page:https://www.staticvoidacademy.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

M0_C7 - Employee Database

Repository with prompt and code for Module 1, Challenge 7: Employee Database.

Prompt

The owner of a small business tried to write a Python program to manage his employees' information, but he has no idea what he's doing.

He hired a previous consultant to write tests for him, but after the consultant left, he couldn't figure out how to use those tests.

He hired you, another consultant, to just get things working.

Requirements

Figure out what the requirements are by reading the tests. Get the tests to pass by fixing problems in employee_database.py. Do not modify any code in test_employee_database.py.

This challenge will test and give you practice in:

  • How to read other peoples' code and fix it
  • How to read the tests
  • How to manually debug (not using a debugging tool)

Notes and Hints

  • You don't necessarily need to know how every line in the tests works... just find out what results the tests check for.
  • You can also manually test the program.
  • There's more code than you're accustomed to, and some of it looks scary. Remember to just think things through and read the code carefully. Aside from try/except and the ternary statement, there's nothing in here you haven't seen before.
  • Look for comments and hints within the code.

Knowledge Tested

  • Conditionals
  • Loops
  • Nesting and Scope
  • Dictionaries
  • User Input
  • Basic Testing
  • Basic Debugging

Instructions

  1. Make sure pipenv is installed. For a tutorial, see 0.3.4 - Pipenv and Python Package Management
  2. Fork this repository to your own account.
  3. Clone the forked repository to your local computer.
  4. Run pipenv install to install the needed modules in a virtual environment.
  5. Run pipenv shell to activate a virtual environment with the installed modules. Alternatively, you can run pipenv run [PROGRAM] instead of the usual python3 [PROGRAM] command.
  6. Inside employee_database.py, you will make your changes. You're welcome to look at test_employee_database.py to see what's being tested and how.
  7. While you're writing and/or when you're done, you can execute the provided tests to verify your program works by running python3 test_employee_database.py. All tests are passing if you see OK in the output. You can also manually test by directly running python3 employee_database.py and inputing your own values.

About

Repository with prompt and code for Module 0, Challenge 7: Employee Database

https://www.staticvoidacademy.com/

License:MIT License


Languages

Language:Python 100.0%