Assignment 5 - Simple Git

Practicing basic Git commands

Objectives

  • Practice the basic Git commands: init, add and commit.

Setup

  1. You must have completed the Lab: Git and GitHub setup.
  2. Create a new directory named git-calc/.
  3. Download calc.py and put it in the git-calc/ directory.
  4. Create a new file named only .gitignore in the git-calc/ directory. Note the . at the beginning! Paste in the following text:
    # This will ignore files we don't need but may show up.
    venv/
    .venv/
    __pycache__/
    .idea/
    .DS_Store
    .vscode/
    
  5. Open the git-calc/ directory in PyCharm.

Instructions

Run calc.py and to try it out with the options. You are going to add to the functionality.

Follow the style in the code. Do not worry about unit testing or error handling for this assignment.

  1. Run the git init command to initialize a new local repository.
  2. Add a “power” option to raise one number to the power of another. Add it to the user menu. Add and commit your changes using git with a meaningful commit message.
  3. Add a “logarithm” option that computes the log(x, base). Import the standard math library and use the log() function. Add it to the user menu. Add and commit your changes using git with a meaningful commit message.
  4. Add one more mathematical operation of your choice. Again, add and commit your changes using git with a meaningful commit message.
  5. All pre-existing options must continue to work, including “Quit”.

Rubric

Partial credit is not awarded for these items: all or nothing.

  • (5 pts) Version history (git log) of submission shows a minimum of three new commits.
  • (5 pts) Commit messages are meaningful, concise, and accurate messages.
  • (5 pts) All options (original features + your additions) correctly work in the final commit.

Submission due October 15

Zip/compress your git-calc/ folder and upload the zip to the Canvas assignment page.

Last modified October 6, 2025.