From 84a18197c66c4b0d31e24b859e7504020b67790b Mon Sep 17 00:00:00 2001 From: rishikondar Date: Tue, 24 Mar 2026 23:16:35 -0400 Subject: [PATCH 1/5] Update lab_1a.py added name --- 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..284471c2 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 = "Rishi Konda" # TODO: Insert your name between the double quotes print(f"{name}, Welcome to the CSS course!") From 00a19056cb183e04a9bceaef388115b739c988c9 Mon Sep 17 00:00:00 2001 From: rishikondar Date: Wed, 25 Mar 2026 10:20:26 -0400 Subject: [PATCH 2/5] change in robot speed 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 284471c2..79e4b8cd 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -1,6 +1,6 @@ """ lab_1a.py - +This is to simulate a change made on a robot: robot_speed = 5 # m/s 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. """ From 2225f2d9ae2a478f43b650df0d456c02496f04c7 Mon Sep 17 00:00:00 2001 From: rishikondar Date: Wed, 25 Mar 2026 10:28:40 -0400 Subject: [PATCH 3/5] changed speed to lower --- 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 79e4b8cd..2239f0e4 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -1,6 +1,6 @@ """ lab_1a.py -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 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. """ From 272297df8e90e46dfd894decd3ebb04a6d76f23e Mon Sep 17 00:00:00 2001 From: rishikondar Date: Wed, 25 Mar 2026 10:29:46 -0400 Subject: [PATCH 4/5] increased robot speed --- 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 79e4b8cd..991f9af3 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -1,6 +1,6 @@ """ lab_1a.py -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 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. """ From c501bfa0b21b5fae2e163248e99246ffdbddbf2a Mon Sep 17 00:00:00 2001 From: rishikondar Date: Wed, 25 Mar 2026 10:57:11 -0400 Subject: [PATCH 5/5] sanatized numbers --- labs/lab_1/lab_1b.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/labs/lab_1/lab_1b.py b/labs/lab_1/lab_1b.py index e58dd957..1745ff20 100644 --- a/labs/lab_1/lab_1b.py +++ b/labs/lab_1/lab_1b.py @@ -36,7 +36,14 @@ def simple_calculator(operation: str, num1: float, num2: float) -> float: raise ValueError("Cannot divide by zero.") else: raise ValueError("Invalid operation. Please choose from 'add', 'subtract', 'multiply', or 'divide'.") - +def request_for_sanatized_number(prompt: str) -> float: + 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 =====")