From d9198f674ac360b670dac58343b2a30e44611d58 Mon Sep 17 00:00:00 2001 From: Dotdotdo Date: Thu, 29 Sep 2022 15:55:28 +0200 Subject: [PATCH 1/6] Did assignment 1 --- assignment_1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assignment_1.py b/assignment_1.py index ad78373..0c93fe0 100644 --- a/assignment_1.py +++ b/assignment_1.py @@ -16,7 +16,7 @@ def lower_case(string): """ ### your code starts here - + lower_string = lower(string) ### your code ends here return lower_string @@ -34,11 +34,11 @@ def upper_case(string): Returns: upper_string -- upper case version of string - + """ ### your code starts here - + upper_string = upper(string) ### your code ends here return upper_string From ebc31dcf7914b6b7e8c84a28fbacc13c97609ec1 Mon Sep 17 00:00:00 2001 From: karinleanne Date: Thu, 29 Sep 2022 16:00:16 +0200 Subject: [PATCH 2/6] added lower case and upper case function --- assignment_1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assignment_1.py b/assignment_1.py index ad78373..4f57543 100644 --- a/assignment_1.py +++ b/assignment_1.py @@ -16,7 +16,7 @@ def lower_case(string): """ ### your code starts here - + lower_string = string.lower() ### your code ends here return lower_string @@ -38,7 +38,7 @@ def upper_case(string): """ ### your code starts here - + upper_string = string.upper() ### your code ends here return upper_string From 71f9a63d598188c0770ec6ca4113b3cf0a56e861 Mon Sep 17 00:00:00 2001 From: maickelhartlief Date: Thu, 29 Sep 2022 16:05:53 +0200 Subject: [PATCH 3/6] added barely anything tbh --- assignment_1.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assignment_1.py b/assignment_1.py index 0c93fe0..560f814 100644 --- a/assignment_1.py +++ b/assignment_1.py @@ -17,6 +17,7 @@ def lower_case(string): ### your code starts here lower_string = lower(string) + ### your code ends here return lower_string @@ -39,6 +40,7 @@ def upper_case(string): ### your code starts here upper_string = upper(string) + ### your code ends here return upper_string From c92317d091c41035ed3acfaf7b2efc17f84613d7 Mon Sep 17 00:00:00 2001 From: Dotdotdo Date: Thu, 29 Sep 2022 16:11:01 +0200 Subject: [PATCH 4/6] added documentation for 2c --- assignment_2c.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/assignment_2c.py b/assignment_2c.py index 1ac1ced..9a44c5b 100644 --- a/assignment_2c.py +++ b/assignment_2c.py @@ -5,7 +5,20 @@ No cheating! Don't show or tell hem the code directly """ def function_2c(w, x, y, z): + """ + This function does various mathematical operations: multiplication, division, + addition and subtraction + Input: + w: float, will be multiplied by y and added/substracted to z + x: float, will be divided by y + y: float + z: float, will be added/substracted by z + + Returns a dictionary with the results for each of the 4 operations, with keys + 'multiply', 'divide', 'add','subtract' + + """ multiplication = x * y division = x / y addition = w + z From 1490afd6b88eaf1234c753cbd23a77797dab80d6 Mon Sep 17 00:00:00 2001 From: maickelhartlief Date: Thu, 29 Sep 2022 16:12:00 +0200 Subject: [PATCH 5/6] documented 2b --- assignment_2b.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/assignment_2b.py b/assignment_2b.py index 1aef416..f6d9562 100644 --- a/assignment_2b.py +++ b/assignment_2b.py @@ -5,7 +5,18 @@ No cheating! Don't show or tell hem the code directly """ def function_2b(string_1, string_2): + ''' + function_2b + inputs: + - string_1 (str) + - string_2 (str) + outputs: + - dictionary with: + - C: string_1 and string_2 appended + - L: string_1 in lower case + - U: string_2 in upper case + ''' lower = string_1.lower() upper = string_2.upper() combined = string_1 + string_2 From 0c6c1231c9dd18ebb69bec048bdce55a52bf1535 Mon Sep 17 00:00:00 2001 From: karinleanne Date: Thu, 29 Sep 2022 16:23:01 +0200 Subject: [PATCH 6/6] Did 2a on basos of documentation od 2c and 2b --- assignment_2a.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assignment_2a.py b/assignment_2a.py index 1b8fc0e..01ce54d 100644 --- a/assignment_2a.py +++ b/assignment_2a.py @@ -10,9 +10,12 @@ just give a correct one. """ -var_1 = function_2c(...) -var_2 = function_2b(...) +var_1 = function_2c(1000,5,10,-50)['add'] + +var_2 = function_2b('Seminars', 'Borrel')['C'] + + if var_1 == 950: print("Good job!")