diff --git a/labs/STAWP.py b/labs/STAWP.py new file mode 100755 index 0000000..d87a0d9 --- /dev/null +++ b/labs/STAWP.py @@ -0,0 +1,4 @@ +def main(): + print("STAWP") + + diff --git a/labs/STAWP.sh b/labs/STAWP.sh new file mode 100755 index 0000000..7ec8a2e --- /dev/null +++ b/labs/STAWP.sh @@ -0,0 +1 @@ +echo "STAWP" diff --git a/labs/lab_1/git_example b/labs/lab_1/git_example new file mode 160000 index 0000000..94d26f0 --- /dev/null +++ b/labs/lab_1/git_example @@ -0,0 +1 @@ +Subproject commit 94d26f026b46d59dcc54b12bf42f4069321de664 diff --git a/labs/lab_1/lab_1a.py b/labs/lab_1/lab_1a.py index 9d15ec8..9fadaad 100644 --- a/labs/lab_1/lab_1a.py +++ b/labs/lab_1/lab_1a.py @@ -3,12 +3,14 @@ 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 somulate a change made on a robot: robot_speed = 8 #m/s """ def main(): print("Hello World!") - - name = "" # TODO: Insert your name between the double quotes + print("Vim works! RIP my spotify") + name = "Hikari" # TODO: Insert your name between the double quotes print(f"{name}, Welcome to the CSS course!") diff --git a/labs/lab_1/lab_1b.py b/labs/lab_1/lab_1b.py old mode 100644 new mode 100755 index e58dd95..2ddadf1 --- a/labs/lab_1/lab_1b.py +++ b/labs/lab_1/lab_1b.py @@ -36,7 +36,13 @@ 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_sanitized_number(promt: 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 =====") diff --git a/labs/lab_1/ls_date.sh b/labs/lab_1/ls_date.sh new file mode 100755 index 0000000..9b3c951 --- /dev/null +++ b/labs/lab_1/ls_date.sh @@ -0,0 +1,3 @@ + +ls +date diff --git a/labs/lab_1/test.txt b/labs/lab_1/test.txt new file mode 100644 index 0000000..765ac98 --- /dev/null +++ b/labs/lab_1/test.txt @@ -0,0 +1 @@ +this is a test text file \ No newline at end of file diff --git a/labs/lab_1/testyay.txt b/labs/lab_1/testyay.txt new file mode 100644 index 0000000..6d65e62 --- /dev/null +++ b/labs/lab_1/testyay.txt @@ -0,0 +1 @@ +this is another text file