From 76acb336c8bb0c496d7ba4ca53d712fb765c162f Mon Sep 17 00:00:00 2001 From: Neil-cpu Date: Sat, 14 Mar 2026 18:01:44 -0400 Subject: [PATCH 01/11] Update lab_1a.py personalized welcome msg --- 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..f5489625 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 = "neil" # TODO: Insert your name between the double quotes print(f"{name}, Welcome to the CSS course!") From c63015daaf369ad1587a03c84ce5da8d4745c7a6 Mon Sep 17 00:00:00 2001 From: Neil-cpu Date: Sat, 14 Mar 2026 18:06:26 -0400 Subject: [PATCH 02/11] Update lab_1a.py student welcome introduction --- labs/lab_1/lab_1a.py | 1 + 1 file changed, 1 insertion(+) diff --git a/labs/lab_1/lab_1a.py b/labs/lab_1/lab_1a.py index f5489625..d5f1f74e 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -11,6 +11,7 @@ def main(): name = "neil" # TODO: Insert your name between the double quotes print(f"{name}, Welcome to the CSS course!") + print("Hey all! My name's Neil and I'm a junior in Boston, MA. Outside of STEM, I loving playing and watching my favorite sports: football and basketball.") if __name__ == "__main__": main() From 9901b48ed6126fcef4f13c88ba075a421805aa31 Mon Sep 17 00:00:00 2001 From: Neil-cpu <147884651+Neil-cpu@users.noreply.github.com> Date: Sat, 14 Mar 2026 18:42:28 -0400 Subject: [PATCH 03/11] Update lab_1a.py comment - simulating a change in robot speed --- labs/lab_1/lab_1a.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/labs/lab_1/lab_1a.py b/labs/lab_1/lab_1a.py index d5f1f74e..b0901faf 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -3,6 +3,8 @@ The first lab in the BWSI CSS course. To complete this lab, fill out the variable on line 10 with your name. Then, save the code, add it to the staging area, and commit it to the Git tree. + +This is to simulate a change made on a robot: robot_speed = 5 # m/s """ def main(): From a09a94e75d03fa04a27212e57b7eae82fcdcf2df Mon Sep 17 00:00:00 2001 From: Neil-cpu <147884651+Neil-cpu@users.noreply.github.com> Date: Sat, 14 Mar 2026 19:09:16 -0400 Subject: [PATCH 04/11] Update lab_1a.py Changing (simulation) speed to 3m/s --- 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 b0901faf..b8eadc7c 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -4,7 +4,7 @@ The first lab in the BWSI CSS course. To complete this lab, fill out the variable on line 10 with your name. Then, save the code, add it to the staging area, and commit it to the Git tree. -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 """ def main(): From 155cfda5953729b0387f2de9007eb467640443b5 Mon Sep 17 00:00:00 2001 From: Neil-cpu Date: Sat, 14 Mar 2026 19:17:02 -0400 Subject: [PATCH 05/11] 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 b0901faf..7a085b71 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -4,7 +4,7 @@ The first lab in the BWSI CSS course. To complete this lab, fill out the variable on line 10 with your name. Then, save the code, add it to the staging area, and commit it to the Git tree. -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 """ def main(): From 158ca2066e3a8279345034f2db89ee151423f1f5 Mon Sep 17 00:00:00 2001 From: Neil-cpu <147884651+Neil-cpu@users.noreply.github.com> Date: Sat, 14 Mar 2026 19:19:38 -0400 Subject: [PATCH 06/11] 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 b8eadc7c..79a23a3c 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -4,7 +4,7 @@ The first lab in the BWSI CSS course. To complete this lab, fill out the variable on line 10 with your name. Then, save the code, add it to the staging area, and commit it to the Git tree. -This is to simulate a change made on a robot: robot_speed = 3 # m/s +This is to simulate a change made on a robot: robot_speed = 2 # m/s """ def main(): From c1d16bc3aea3954ec3fded15f7f5a9ec419547b1 Mon Sep 17 00:00:00 2001 From: Neil-cpu Date: Sat, 14 Mar 2026 19:21:48 -0400 Subject: [PATCH 07/11] 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 7a085b71..b0901faf 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -4,7 +4,7 @@ The first lab in the BWSI CSS course. To complete this lab, fill out the variable on line 10 with your name. Then, save the code, add it to the staging area, and commit it to the Git tree. -This is to simulate a change made on a robot: robot_speed = 8 # m/s +This is to simulate a change made on a robot: robot_speed = 5 # m/s """ def main(): From 0d80fbc0b9beb1abac475ad9022cb239640baedb Mon Sep 17 00:00:00 2001 From: Neil-cpu Date: Sat, 14 Mar 2026 19:23:35 -0400 Subject: [PATCH 08/11] 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 79a23a3c..b0901faf 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -4,7 +4,7 @@ The first lab in the BWSI CSS course. To complete this lab, fill out the variable on line 10 with your name. Then, save the code, add it to the staging area, and commit it to the Git tree. -This is to simulate a change made on a robot: robot_speed = 2 # m/s +This is to simulate a change made on a robot: robot_speed = 5 # m/s """ def main(): From 5a70eff03736c46cb99b1b98be62181d7a4ba05b Mon Sep 17 00:00:00 2001 From: Neil-cpu <147884651+Neil-cpu@users.noreply.github.com> Date: Sat, 14 Mar 2026 19:24:17 -0400 Subject: [PATCH 09/11] 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 b0901faf..b8eadc7c 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -4,7 +4,7 @@ The first lab in the BWSI CSS course. To complete this lab, fill out the variable on line 10 with your name. Then, save the code, add it to the staging area, and commit it to the Git tree. -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 """ def main(): From 9bb9a16710b18135088b30f72bfbe6b5b3f44250 Mon Sep 17 00:00:00 2001 From: Neil-cpu Date: Sat, 14 Mar 2026 19:26:09 -0400 Subject: [PATCH 10/11] 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 b0901faf..7a085b71 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -4,7 +4,7 @@ The first lab in the BWSI CSS course. To complete this lab, fill out the variable on line 10 with your name. Then, save the code, add it to the staging area, and commit it to the Git tree. -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 """ def main(): From 48974cb3db8cb79e4734259c8e9f6f1978c4aeff Mon Sep 17 00:00:00 2001 From: Neil-cpu Date: Sun, 15 Mar 2026 21:10:28 -0400 Subject: [PATCH 11/11] Update lab_1b.py --- labs/lab_1/lab_1b.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/labs/lab_1/lab_1b.py b/labs/lab_1/lab_1b.py index e58dd957..859ff168 100644 --- a/labs/lab_1/lab_1b.py +++ b/labs/lab_1/lab_1b.py @@ -37,18 +37,26 @@ def simple_calculator(operation: str, num1: float, num2: float) -> float: else: 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: + operation = input("Enter operation: ").lower() + + num1 = float(input("Enter 1st num: ")) + num2 = float(input("Enter 2nd num: ")) + + result = simple_calculator(operation, num1, num2) + print("Result:", result) + break - # 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}") + except ValueError as e: + print("Error:", e) + print("Try again\n") if __name__ == "__main__":