From e2e4d9ef56eaea091fe12f750c1d1b469016343f Mon Sep 17 00:00:00 2001 From: 33ace Date: Sun, 1 Mar 2026 01:43:59 -0500 Subject: [PATCH 1/9] Added name to lab 1a --- labs/lab_1/lab_1a.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labs/lab_1/lab_1a.py b/labs/lab_1/lab_1a.py index 9d15ec83..dcfcebee 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -8,7 +8,7 @@ def main(): print("Hello World!") - name = "" # TODO: Insert your name between the double quotes + name = "Ben Chang" print(f"{name}, Welcome to the CSS course!") From 56bdb2e35e850685d447eb0862f3dad205dfa45a Mon Sep 17 00:00:00 2001 From: 33ace Date: Sun, 1 Mar 2026 01:55:19 -0500 Subject: [PATCH 2/9] Added intro to 1a --- labs/lab_1/lab_1a.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labs/lab_1/lab_1a.py b/labs/lab_1/lab_1a.py index dcfcebee..f56a10dc 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -11,6 +11,6 @@ def main(): name = "Ben Chang" print(f"{name}, Welcome to the CSS course!") - +print("Hey everyone. My name's Ben and I'm a junior from Massachusetts. My favorite school subject is physics. For fun, I like to read, watch TV, or go out to try random food with my friends. My favorite ice cream flavor is pistachio.") if __name__ == "__main__": main() From 9cccc081f77be04701758dac3c568e639ebdb37d Mon Sep 17 00:00:00 2001 From: 33ace Date: Mon, 2 Mar 2026 10:13:14 -0500 Subject: [PATCH 3/9] Add comment about robot speed variable Added a comment explaining the purpose of the variable --- labs/lab_1/lab_1a.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labs/lab_1/lab_1a.py b/labs/lab_1/lab_1a.py index f56a10dc..00aaf8f3 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -1,4 +1,4 @@ -""" +"This is to simulate a change made on a robot: robot_speed = 5 # m/s" lab_1a.py The first lab in the BWSI CSS course. To complete this lab, fill out the variable on line 10 From 9d8d595ba0870aba07cffa14d7bdaaab6b003a2b Mon Sep 17 00:00:00 2001 From: 33ace Date: Mon, 2 Mar 2026 13:00:15 -0500 Subject: [PATCH 4/9] Update lab_1a.py --- labs/lab_1/lab_1a.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labs/lab_1/lab_1a.py b/labs/lab_1/lab_1a.py index 00aaf8f3..91e9b73f 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -1,4 +1,4 @@ -"This is to simulate a change made on a robot: robot_speed = 5 # m/s" +"This is to simulate a change made on a robot: robot_speed = 8 # m/s" lab_1a.py The first lab in the BWSI CSS course. To complete this lab, fill out the variable on line 10 From 4110f7cd61ca2213f2f6db0f4bc056c9fa4cd6f6 Mon Sep 17 00:00:00 2001 From: 33ace Date: Mon, 2 Mar 2026 13:03:07 -0500 Subject: [PATCH 5/9] Update lab_1a.py --- labs/lab_1/lab_1a.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labs/lab_1/lab_1a.py b/labs/lab_1/lab_1a.py index 00aaf8f3..26fcc6a3 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -1,4 +1,4 @@ -"This is to simulate a change made on a robot: robot_speed = 5 # m/s" +"This is to simulate a change made on a robot: robot_speed = 3 # m/s" lab_1a.py The first lab in the BWSI CSS course. To complete this lab, fill out the variable on line 10 From 552a3bd094ef1074bdc390982e963e222c33877f Mon Sep 17 00:00:00 2001 From: 33ace Date: Thu, 5 Mar 2026 23:53:16 -0500 Subject: [PATCH 6/9] Update lab_1b.py --- labs/lab_1/lab_1b.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/labs/lab_1/lab_1b.py b/labs/lab_1/lab_1b.py index e58dd957..2ece1f25 100644 --- a/labs/lab_1/lab_1b.py +++ b/labs/lab_1/lab_1b.py @@ -38,17 +38,20 @@ def simple_calculator(operation: str, num1: float, num2: float) -> float: raise ValueError("Invalid operation. Please choose from 'add', 'subtract', 'multiply', or 'divide'.") def main(): - print(f"===== Simple Calculator =====") - - # Ask the user for sample input - num1 = float(input("Enter the first number: ")) - num2 = float(input("Enter the second number: ")) - operation = input("Enter the operation (add, subtract, multiply, divide): ").strip().lower() + while True: + try: + # Ask the user for sample input + num1 = float(input("Enter the first number: ")) + num2 = float(input("Enter the second number: ")) + operation = input("Enter the operation (add, subtract, multiply, divide): ").strip().lower() # Perform the calculation and display the result - result = simple_calculator(operation, num1, num2) - print(f"The result of {operation}ing {num1} and {num2} is: {result}") + result = simple_calculator(operation, num1, num2) + print(f"The result of {operation}ing {num1} and {num2} is: {result}") + break + except ValueError: + print("Error") if __name__ == "__main__": From 34e998f86d8e4e353ffa3df5b52cbb57a17c4ecf Mon Sep 17 00:00:00 2001 From: 33ace Date: Thu, 19 Mar 2026 01:14:48 -0400 Subject: [PATCH 7/9] Create run_test.yml --- tests/.github/workflows/run_test.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/.github/workflows/run_test.yml diff --git a/tests/.github/workflows/run_test.yml b/tests/.github/workflows/run_test.yml new file mode 100644 index 00000000..e69de29b From a115149d324b697575ec52dd64f1e5dd12526f65 Mon Sep 17 00:00:00 2001 From: 33ace Date: Thu, 19 Mar 2026 01:21:56 -0400 Subject: [PATCH 8/9] added test workflow --- tests/.github/workflows/run_test.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/.github/workflows/run_test.yml b/tests/.github/workflows/run_test.yml index e69de29b..c45bcbfc 100644 --- a/tests/.github/workflows/run_test.yml +++ b/tests/.github/workflows/run_test.yml @@ -0,0 +1,32 @@ +name: simple_calculator unit test + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with Ruff + run: | + pip install ruff + ruff --format=github --target-version=py310 . + continue-on-error: true + - name: Test with pytest + run: | + coverage run -m pytest tests/tests_1b.py -v -s + - name: Generate Coverage Report + run: | + coverage report -m \ No newline at end of file From 17d9f76f87fa704cbee382a3fa41defebff4bdfc Mon Sep 17 00:00:00 2001 From: 33ace Date: Thu, 19 Mar 2026 01:35:16 -0400 Subject: [PATCH 9/9] Add github actions workflow --- {tests/.github => .github}/workflows/run_test.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {tests/.github => .github}/workflows/run_test.yml (100%) diff --git a/tests/.github/workflows/run_test.yml b/.github/workflows/run_test.yml similarity index 100% rename from tests/.github/workflows/run_test.yml rename to .github/workflows/run_test.yml