Assignment 5 - Simple Git
Practicing basic Git commands
Objectives
- Practice the basic Git commands:
init,addandcommit.
Setup
- You must have completed the Lab: Git and GitHub setup.
- Create a new directory named
git-calc/. - Download
calc.pyand put it in thegit-calc/directory. - Create a new file named only
.gitignorein thegit-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/ - 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.
- Run the
git initcommand to initialize a new local repository. - 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.
- Add a “logarithm” option that computes the
log(x, base). Import the standardmathlibrary and use thelog()function. Add it to the user menu. Add and commit your changes using git with a meaningful commit message. - Add one more mathematical operation of your choice. Again, add and commit your changes using git with a meaningful commit message.
- 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.