Skip to content

Dann2150/github-workshop-25-26

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ GitHub Workshop: Calculator Project (Python + Java)

Welcome to the GitHub Workshop Calculator Project!
This repository is designed to help you learn and practice Git version control, branching, collaboration, and merging workflows โ€” all while contributing simple code in Python or Java.

๐Ÿ“ Project Structure


github-workshop/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ python/
โ”‚   โ”œโ”€โ”€ calculator.py
โ”‚   โ””โ”€โ”€ operations.py
โ””โ”€โ”€ java/
    โ”œโ”€โ”€ Calculator.java
    โ””โ”€โ”€ Operations.java

Each folder contains a simple calculator app that performs basic arithmetic operations.
Participants can modify, extend, and experiment with Git workflows while improving the app.


โš™๏ธ Setup Instructions

๐Ÿ Python Version

  1. Navigate to the Python directory:
   cd python
  1. Run the calculator:
python calculator.py

โ˜• Java Version

  1. Navigate to the Java directory:
cd java
  1. Compile and run the program:
javac utils/Operations.java Calculator.java
java Calculator

๐Ÿงฉ Your Workshop Tasks

Each participant should:

  1. Create a new branch based on dev.

    git checkout dev
    git pull
    git checkout -b feature-yourname
  2. Make a meaningful code change:

    • Add a new function (modulus, power, average, etc.)
    • Fix a bug (e.g., divide-by-zero handling)
    • Improve output formatting or add comments
  3. Commit and push your changes:

    git add .
    git commit -m "Added power function in operations.py"
    git push origin feature-yourname
  4. Open a Pull Request on GitHub targeting dev.

  5. Review and merge your pull request once approved.


๐Ÿง  Example Challenge Ideas

Here are some ideas to extend the calculator:

  • Add a power function: a^b
  • Add a modulus function: a % b
  • Add an average function: (a + b) / 2
  • Handle invalid input or string formatting
  • Add user input support instead of hardcoded values

๐Ÿช„ Best Practices to Follow


๐Ÿง‘โ€๐Ÿ’ป Contributing Guidelines

  1. Fork this repository.

  2. Create a feature branch:

    git checkout -b feature-name
  3. Commit your changes:

    git commit -m "Add feature-name"
  4. Push to your branch and open a pull request.

  5. Wait for review before merging.


๐Ÿงพ License

This project is licensed under the MIT License.

About

Sample Project Implemented in python and java meant for students to fork and follow along in workshop.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 62.1%
  • Python 37.9%