From 797956e069c7cd56da0a855e729d08419fd0a71a Mon Sep 17 00:00:00 2001 From: YunxiangLi Date: Thu, 21 Oct 2021 16:23:39 +0200 Subject: [PATCH 1/6] Update assignment_1.py --- assignment_1.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/assignment_1.py b/assignment_1.py index 166ef54..0162f54 100644 --- a/assignment_1.py +++ b/assignment_1.py @@ -9,14 +9,16 @@ def lower_case(string): """ Argument: string -- text you want to turn into lower case - Returns: lower_string -- lower case version of string - """ ### your code starts here + + lower_string = string.lower() + + ### your code ends here return lower_string @@ -31,14 +33,14 @@ def upper_case(string): """ Argument: string -- text you want to turn into upper case - Returns: upper_string -- upper case version of string """ ### your code starts here + upper_string = string.lupper() ### your code ends here - return lower_string + return upper_string From 68786060fdb0c87351f7268ca880d3eb89aa984a Mon Sep 17 00:00:00 2001 From: YunxiangLi Date: Thu, 21 Oct 2021 16:26:34 +0200 Subject: [PATCH 2/6] Update assignment_2a.py --- assignment_2a.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assignment_2a.py b/assignment_2a.py index 529aceb..4ab4786 100644 --- a/assignment_2a.py +++ b/assignment_2a.py @@ -9,11 +9,11 @@ just give a correct one. """ -var_1 = function_2b(...) +var_1 = function_2c(1000,5,5,-50)["add"] -var_2 = function_2c(...) +var_2 = function_2b('Seminars','Borrel')["C"] -var_3 = str(function_2b(...)) + function_2c(...) +var_3 = str(function_2c(5,1000,10,5)['multiply']) + function_2b('CLS','CLS')["L"] if var_1 == 950: print("Good job!") From 3536943d0b4f8c463fc7e325c4be9a9e6d827aae Mon Sep 17 00:00:00 2001 From: 2211064636 <2211064636@qq.com> Date: Thu, 21 Oct 2021 16:46:55 +0200 Subject: [PATCH 3/6] Update assignment_1.py --- assignment_1.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assignment_1.py b/assignment_1.py index 166ef54..c623b6c 100644 --- a/assignment_1.py +++ b/assignment_1.py @@ -16,7 +16,8 @@ def lower_case(string): """ ### your code starts here - + lower_string = string + lower_string = lower_string.lower() ### your code ends here return lower_string @@ -38,7 +39,8 @@ def upper_case(string): """ ### your code starts here - + lower_string = string + lower_string = lower_string.upper() ### your code ends here return lower_string From 1bed78a1ad6a096b0f24a6a096e5dd062a5c50d8 Mon Sep 17 00:00:00 2001 From: 2211064636 <59914975+2211064636@users.noreply.github.com> Date: Thu, 21 Oct 2021 17:26:08 +0200 Subject: [PATCH 4/6] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cefc94b..d3805a6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Seminars +# Seminars (All documents have been modified in Wiki) Assignment for Seminars Lecture on Team-based Coding Projects Instructions: @@ -11,4 +11,4 @@ Clone the repository to your workstation and open assigment_1.py in your favorit When you are finished, you split up for assignment 2. One of you opens 2a, the other two do 2b and 2c (if you are a group of two, the same person does 2b and 2c). Everyone follows the instructions in their script. Once you have pushed all your changes, continue. -4. Create a pull request for me to this (original) repo. (Hint: you can use the "New pull request" button and then do a "compare across forks"). \ No newline at end of file +4. Create a pull request for me to this (original) repo. (Hint: you can use the "New pull request" button and then do a "compare across forks"). From 2f657b1afdc4665dda9eebb52cf9fa04bda72c9b Mon Sep 17 00:00:00 2001 From: Alan Sammarone Date: Tue, 26 Oct 2021 18:08:51 +0200 Subject: [PATCH 5/6] Update assignment_2b.py --- assignment_2b.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/assignment_2b.py b/assignment_2b.py index 1aef416..2435ac0 100644 --- a/assignment_2b.py +++ b/assignment_2b.py @@ -5,13 +5,24 @@ No cheating! Don't show or tell hem the code directly """ def function_2b(string_1, string_2): - + """Transform string_1 to upper case, string 2 to lower_case, + and combine both into a single string + + Args: + string_1 (str): String to transform to upper case + string_2 (str): String to transform to lower case + + Returns: + dict: Dict containing upper, lower, and concatened strs + """ lower = string_1.lower() upper = string_2.upper() combined = string_1 + string_2 - - dict = {"L": lower, - "U": upper, - "C": combined} + + dict = { + "L": lower, + "U": upper, + "C": combined + } return dict From fcd564834dbac24d44439e7a508159da1b88be18 Mon Sep 17 00:00:00 2001 From: Alan Sammarone Date: Tue, 26 Oct 2021 18:10:39 +0200 Subject: [PATCH 6/6] Update assignment_2c.py --- assignment_2c.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/assignment_2c.py b/assignment_2c.py index 1ac1ced..b45a9e4 100644 --- a/assignment_2c.py +++ b/assignment_2c.py @@ -5,7 +5,17 @@ No cheating! Don't show or tell hem the code directly """ def function_2c(w, x, y, z): - + """Compute various arithmetic operations on input + + Args: + w (float): Input number + x (float): Input number + y (float): Input number + z (float): Input number + + Returns: + dict: Dictionary containing x * y, x / y, w + z, w -z + """ multiplication = x * y division = x / y addition = w + z