diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..38734ca Binary files /dev/null and b/.DS_Store differ diff --git a/__pycache__/assignment_2b.cpython-39.pyc b/__pycache__/assignment_2b.cpython-39.pyc new file mode 100644 index 0000000..4af1305 Binary files /dev/null and b/__pycache__/assignment_2b.cpython-39.pyc differ diff --git a/__pycache__/assignment_2c.cpython-39.pyc b/__pycache__/assignment_2c.cpython-39.pyc new file mode 100644 index 0000000..eab2203 Binary files /dev/null and b/__pycache__/assignment_2c.cpython-39.pyc differ diff --git a/assignment_1.py b/assignment_1.py index 166ef54..48f6927 100644 --- a/assignment_1.py +++ b/assignment_1.py @@ -16,6 +16,7 @@ def lower_case(string): """ ### your code starts here + lower_string = string.lower() ### your code ends here diff --git a/assignment_2a.py b/assignment_2a.py index 529aceb..c33869f 100644 --- a/assignment_2a.py +++ b/assignment_2a.py @@ -8,12 +8,14 @@ Run the script to see if you succeeded! PS: Multiple combinations are possible, just give a correct one. """ +help(function_2b) +help(function_2c) -var_1 = function_2b(...) +var_1 = function_2c(1000, 5, -5, 50)['subtract'] -var_2 = function_2c(...) +var_2 = function_2b('Seminars', 'Borrel')['C'] -var_3 = str(function_2b(...)) + function_2c(...) +var_3 = str(function_2c(5, 10, 1000, 5)['multiply']) + function_2b('CLs', 'borrel')['L'] if var_1 == 950: print("Good job!") diff --git a/assignment_2b.py b/assignment_2b.py index 1aef416..25861b3 100644 --- a/assignment_2b.py +++ b/assignment_2b.py @@ -5,7 +5,7 @@ No cheating! Don't show or tell hem the code directly """ def function_2b(string_1, string_2): - + ''' the function results in the first string in lower case, the second strong in upper case and then both of them combined. ''' lower = string_1.lower() upper = string_2.upper() combined = string_1 + string_2 diff --git a/assignment_2c.py b/assignment_2c.py index 1ac1ced..047c565 100644 --- a/assignment_2c.py +++ b/assignment_2c.py @@ -5,7 +5,7 @@ No cheating! Don't show or tell hem the code directly """ def function_2c(w, x, y, z): - + '''this function multiplies the 2nd and 3rd input, divides the 2nd and 3rd input, adds the 1st and 4th input, and subtracts the 4th from the 1st input ''' multiplication = x * y division = x / y addition = w + z