From 1c21e86bf1c83efa86e4f18da5eed335f19a3960 Mon Sep 17 00:00:00 2001 From: MicahKuo Date: Tue, 17 Feb 2026 11:56:39 -0500 Subject: [PATCH 1/8] add name to lab_1a.py I added my name between the quotation marks --- 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..0213e028 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 = "Micah Kuo" # TODO: Insert your name between the double quotes print(f"{name}, Welcome to the CSS course!") From 64f717c53928ab0b22b30985cf2dd7b4796ca669 Mon Sep 17 00:00:00 2001 From: MicahKuo Date: Tue, 17 Feb 2026 22:46:21 -0500 Subject: [PATCH 2/8] 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 0213e028..c48440ce 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -1,4 +1,4 @@ -""" +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 e2ded07d51604c68891308f5542f96b82d5c1b1b Mon Sep 17 00:00:00 2001 From: MicahKuo Date: Wed, 18 Feb 2026 14:07:46 -0500 Subject: [PATCH 3/8] Update lab_1a.py made it to 3 and not five --- labs/lab_1/lab_1a.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/labs/lab_1/lab_1a.py b/labs/lab_1/lab_1a.py index c48440ce..deecb929 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -1,8 +1,10 @@ -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 with your name. Then, save the code, add it to the staging area, and commit it to the Git tree. + +robot_speed = 3 # m/s """ def main(): From fc71a5ddbf15c06e00b5f17a51641fe49d7a6416 Mon Sep 17 00:00:00 2001 From: MicahKuo Date: Wed, 18 Feb 2026 14:14:58 -0500 Subject: [PATCH 4/8] Update lab_1a.py reset --- 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 deecb929..7e60f74d 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. -robot_speed = 3 # m/s +robot_speed = 5 # m/s """ def main(): From b0196c7e14da0a83983a51adf2c34c153e001cad Mon Sep 17 00:00:00 2001 From: MicahKuo Date: Wed, 18 Feb 2026 14:15:12 -0500 Subject: [PATCH 5/8] Update lab_1a.py lets do it again --- 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 7e60f74d..deecb929 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. -robot_speed = 5 # m/s +robot_speed = 3 # m/s """ def main(): From 680fe6b39e93877614e37daacbd3f2fe732e8be0 Mon Sep 17 00:00:00 2001 From: MicahKuo Date: Wed, 18 Feb 2026 14:16:10 -0500 Subject: [PATCH 6/8] Update lab_1a.py w --- 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 deecb929..7e60f74d 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. -robot_speed = 3 # m/s +robot_speed = 5 # m/s """ def main(): From 41839f3874c721f7b3a8b382db4bb8f2a1fd8da4 Mon Sep 17 00:00:00 2001 From: MicahKuo Date: Wed, 18 Feb 2026 14:18:49 -0500 Subject: [PATCH 7/8] Update lab_1a.py one last time --- 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 7e60f74d..deecb929 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. -robot_speed = 5 # m/s +robot_speed = 3 # m/s """ def main(): From 5f9a14901428eb6c9c015507ecc8753c6131f125 Mon Sep 17 00:00:00 2001 From: MicahKuo Date: Sat, 21 Feb 2026 17:58:45 -0500 Subject: [PATCH 8/8] Add user input sanitization --- labs/lab_1/lab_1b.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/labs/lab_1/lab_1b.py b/labs/lab_1/lab_1b.py index e58dd957..ae87e522 100644 --- a/labs/lab_1/lab_1b.py +++ b/labs/lab_1/lab_1b.py @@ -37,6 +37,19 @@ def simple_calculator(operation: str, num1: float, num2: float) -> float: else: raise ValueError("Invalid operation. Please choose from 'add', 'subtract', 'multiply', or 'divide'.") +def request_sanitized_numnber(prompt: str) ->float: + """ + Function to request and sanitze user input for the operation + + Returns: + float: The sanitized numeric input by the user + """ + while True: + try: + number = float(input(prompt)) + return number + except ValueError: + print("Invalid input. Please enter a valid number.") def main(): print(f"===== Simple Calculator =====")