The objective of this exercise is to practice collaborating on a Python project hosted on a private GitHub repository. Students will work together to implement different arithmetic operations and utilize Git and GitHub for version control and collaboration.
You will be working on a simple Python project called "Calculator". The project aims to provide basic arithmetic operations such as addition, subtraction, multiplication, and division.
<aside> đź’ˇ General guidelines:
git pull
</aside>Team Lead: Create a private GitHub repository named "Calculator" and initialize it with a README.md file.
Team Lead: Make the first commit titled "Add functionality for addition" and push. Use the following code in a main.py:
def calculate(text_input):
if text_input[1] == "+":
return int(text_input[0])+int(text_input[-1])
calculation = input("What do you want to calculate?")
answer = calculate(calculation)
print(f"The result is {answer}")
Team Lead: Invite the other two developers as collaborators to the private repository.
Every ticket will be done by one developer.
The code for every ticket should be committed locally, and pushed.
Don’t worry right now if your commit was not perfect code, or had a mistake. It can always be fixed in the next commit, either by you or a colleague.
These tickets are a rough outline. If things go wrong, more commits will be necessary. That is no problem.
Tickets:
<aside> ⚠️ Handling Merge Conflicts
git pull and resolve merge conflict by editing the file in PyCharm and choosing the changes you want to keep.