From b6c3e1ce3cc2da610b8644405c523870ee66f530 Mon Sep 17 00:00:00 2001 From: ccfelius Date: Thu, 24 Sep 2020 15:40:06 +0200 Subject: [PATCH 01/10] created functions --- assignment_1.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/assignment_1.py b/assignment_1.py index 22b0d0b..f2ee5e6 100644 --- a/assignment_1.py +++ b/assignment_1.py @@ -15,9 +15,11 @@ def lower_case(string): """ - ### your code starts here + # your code starts here - ### your code ends here + lower_string = string.lower() + + # your code ends here return lower_string @@ -39,6 +41,8 @@ def upper_case(string): ### your code starts here + upper_string = string.upper() + ### your code ends here - return lower_string + return upper_string From 65fdbe6a72abfe96ea04137ab48f8e9699be21db Mon Sep 17 00:00:00 2001 From: Daan Moll Date: Thu, 24 Sep 2020 15:40:46 +0200 Subject: [PATCH 02/10] ass 1 --- assignment_1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assignment_1.py b/assignment_1.py index 22b0d0b..e3e8425 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 - + lower_string = string.upper() ### your code ends here return lower_string From e3f40a9b74fbe30b4ce5165c4cfec702578f7fe5 Mon Sep 17 00:00:00 2001 From: kamielgulpen Date: Thu, 24 Sep 2020 15:42:09 +0200 Subject: [PATCH 03/10] upper lower --- assignment_1.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/assignment_1.py b/assignment_1.py index 22b0d0b..30f46ee 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,6 @@ def upper_case(string): """ ### your code starts here - + upper_string = string.lower() ### your code ends here - - return lower_string + return upper_string From de0d6d284d46053c0ee58cf2d8b0985bc9aac14a Mon Sep 17 00:00:00 2001 From: kamielgulpen Date: Thu, 24 Sep 2020 15:55:28 +0200 Subject: [PATCH 04/10] added documentation --- assignment_2b.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/assignment_2b.py b/assignment_2b.py index 2a385c6..fb5c80d 100644 --- a/assignment_2b.py +++ b/assignment_2b.py @@ -5,7 +5,13 @@ No cheating! Don't show or tell hem the code directly """ def function_2b(string_1, string_2): - + """ + Takes as input 2 strings and gives as output a dictionary. The dictionary with + key "L" gives back the first string in lowercase, the dictionary with key "U" + gives back the second string in uppercase and the dictionary with key "C" + gives a third output which is a combination of both strings + of both strings + """ lower = string_1.lower() upper = string_2.upper() combined = string_1 + string_2 From 1f5576e3f4f2c57c97807332d46dfe48e573397a Mon Sep 17 00:00:00 2001 From: Daan Moll Date: Thu, 24 Sep 2020 15:59:39 +0200 Subject: [PATCH 05/10] 2c --- assignment_2c.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/assignment_2c.py b/assignment_2c.py index eaaa99a..e7b4e63 100644 --- a/assignment_2c.py +++ b/assignment_2c.py @@ -3,8 +3,29 @@ implement the function, without knowing the code. Send your partner the documentation and see if he can work with it. No cheating! Don't show or tell hem the code directly + +The function_2c takes 4 parameters as input +parameters: + +input(w, x, y, z) + +multiply: x * y +division: x / y +addition: w + z +substraction: w - z + +outputs results in form of a dict with entries named after the """ def function_2c(w, x, y, z): + """ + The function_2c takes 4 parameters as input(w, x, y, z). The output is a dictionary. + This dictionary contains entries: multiply, division, addition, substraction. + + multiply: x * y + division: x / y + addition: w + z + substraction: w - z + """ multiplication = x * y division = x / y From b398bbff848b21c62031882bd3f6e1c60c7e4930 Mon Sep 17 00:00:00 2001 From: ccfelius Date: Thu, 24 Sep 2020 16:05:30 +0200 Subject: [PATCH 06/10] func 2a working --- assignment_2a.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/assignment_2a.py b/assignment_2a.py index 6395db2..e9a89da 100644 --- a/assignment_2a.py +++ b/assignment_2a.py @@ -1,5 +1,9 @@ from assignment_2b import function_2b from assignment_2c import function_2c + +print(function_2b.__doc__) +print(function_2c.__doc__) + """ Used the imported functions (function_2b and function_2c) and the documentation provided by your teammates to generate the correct answers below. You can use @@ -9,11 +13,18 @@ just give a correct one. """ -var_1 = function_2b(...) +string1 = "Seminars" +string2 = "CLS" +w = 5 +x = 10 +y = 1000 +z = -50 + +var_1 = function_2b(string1, string2) -var_2 = function_2c(...) +var_2 = function_2c(w, x, y, z) -var_3 = str(function_2b(...)) + function_2c(...) +var_3 = str(function_2b(string1, string2)) + str(function_2c(w,x,y,z)) if var_1 == 950: print("Good job!") From 95b85f165fceee112aa0d51880b9fefd9f6edc16 Mon Sep 17 00:00:00 2001 From: Daan Moll Date: Thu, 24 Sep 2020 16:27:25 +0200 Subject: [PATCH 07/10] small correciton --- __pycache__/assignment_2b.cpython-38.pyc | Bin 0 -> 984 bytes __pycache__/assignment_2c.cpython-38.pyc | Bin 0 -> 1160 bytes assignment_2a.py | 23 ++++++++++++----------- assignment_2c.py | 10 +++++----- 4 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 __pycache__/assignment_2b.cpython-38.pyc create mode 100644 __pycache__/assignment_2c.cpython-38.pyc diff --git a/__pycache__/assignment_2b.cpython-38.pyc b/__pycache__/assignment_2b.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c09fd24294df1a8330fbbb9658daf85a3e7b69ef GIT binary patch literal 984 zcmZuw!EO^V5cO_0X;@T=8`mKhh*Tw_XM{kh#HI9-MisfN9NWoS*|j6vX%w`%@fjS- z5s6RWOZLiNAcPoun-EaFvSZJT-@G@TOioWzg5&$QBD-l3^1~mFM~sIzIPDW$IGGY2 z@%R&&M!Yp9{p91X^u|ahfCATST?*x>lUl)C8*sS*E6Y_OV7^u?*k_{9n*n^#YXd84 zoDv2$vM3;@w*s6_L%hcc*Z23%Fv#V4?O>_&Myf^dGR?&R#zJw}9s^?H^j|s@L#z-W z=YXUbRj|=!89+h0L3*WubV1(>kW7n!m|_QAtP{U1arkUWxhK5(ZNlE zbA;2rz@;L0u6z^pxz9Dy~{p!lTcvUAt;y6=V87A|wSI*K{c?PzzG6 zQ0zHaXOI(`P{2aoHcqUA_hQXus46wv0bHZ7zvmz=KrY1=dY8TX+cV0RO=YFAC^Eof zHo#{QhEXfdg8M%t2q=?YKx}v%kgQ=Ia<0HRCiyM Qny(A-8k>k%-;zn^58IO|ApigX literal 0 HcmV?d00001 diff --git a/__pycache__/assignment_2c.cpython-38.pyc b/__pycache__/assignment_2c.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1fb41e33680ba27d3f5ac9c5a199b296a077db1f GIT binary patch literal 1160 zcmb7E&5qMB5O%u#$$AAsuo6gIh7)utt+e7)Ap}|^ZhI*!L@$*$cDL3hb`?9#rb=%- z1}}ib1Mm{OK(0ImNJxy`q+5-q;OrkzMG_!nM-5R9F6Qq`4TvL?{l$J|S*Q z|8c@9WVa)5nTp89 z1*IR5tZ{L68i8fk!oW)x8B2r}sR3p{s%2*BEjFgqL(lR7+zg-?z`9RqlEqdo<6;aq zZ~_J8awQE)>E3>=p_d>M^9aNG{P#_wL=_r@IAxVoMKl7W$T!1+V1<9Y&s<=4<3?D*L@$6 zO|NX1ow8f@c<`mY3Cj>`q_zG<0o#8FwXe$18*YOFiDLQ~Pz071!T(**23;>lJz)rp)^+e6GT7KA~Ta!8kHHPMO4r*XWRi~kb`|T=hSf|}B zQ+0sWRfrZobze#UunO`jxT%7o3f9xRwSkQMF`9-=6->h>|I?$!8bhA;>P)9DbH4li zesp25@ Date: Thu, 24 Sep 2020 16:34:58 +0200 Subject: [PATCH 08/10] working --- assignment_2a.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/assignment_2a.py b/assignment_2a.py index e9a89da..530b596 100644 --- a/assignment_2a.py +++ b/assignment_2a.py @@ -1,9 +1,6 @@ from assignment_2b import function_2b from assignment_2c import function_2c -print(function_2b.__doc__) -print(function_2c.__doc__) - """ Used the imported functions (function_2b and function_2c) and the documentation provided by your teammates to generate the correct answers below. You can use @@ -13,18 +10,11 @@ just give a correct one. """ -string1 = "Seminars" -string2 = "CLS" -w = 5 -x = 10 -y = 1000 -z = -50 - -var_1 = function_2b(string1, string2) +var_2 = function_2b("Seminars", "Borrel")['C'] -var_2 = function_2c(w, x, y, z) +var_1 = function_2c(1000, 100, 10, -50)['add'] -var_3 = str(function_2b(string1, string2)) + str(function_2c(w,x,y,z)) +var_3 = str(function_2c(5, 1000, 10, 10)['multiply']) + str(function_2b("cls", "")['L']) if var_1 == 950: print("Good job!") From 89f55233bb20b8fb8507cd33438dffd8ba70ec3b Mon Sep 17 00:00:00 2001 From: Daan Moll Date: Thu, 24 Sep 2020 16:44:09 +0200 Subject: [PATCH 09/10] readme.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8da7f2b..3c26242 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Seminars +Assignment by: Lotte Felius, Kamiel Gulpen & Daan Moll Assignment for Seminars Lecture on Team-based Coding Projects Instructions: From abce21aa3c8ed9177ac772ec542b07bdbf8aaa0d Mon Sep 17 00:00:00 2001 From: ccfelius Date: Fri, 25 Sep 2020 10:37:36 +0200 Subject: [PATCH 10/10] Deleted pycache --- __pycache__/assignment_2b.cpython-38.pyc | Bin 984 -> 0 bytes __pycache__/assignment_2c.cpython-38.pyc | Bin 1160 -> 0 bytes assignment_2a.py | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 __pycache__/assignment_2b.cpython-38.pyc delete mode 100644 __pycache__/assignment_2c.cpython-38.pyc diff --git a/__pycache__/assignment_2b.cpython-38.pyc b/__pycache__/assignment_2b.cpython-38.pyc deleted file mode 100644 index c09fd24294df1a8330fbbb9658daf85a3e7b69ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 984 zcmZuw!EO^V5cO_0X;@T=8`mKhh*Tw_XM{kh#HI9-MisfN9NWoS*|j6vX%w`%@fjS- z5s6RWOZLiNAcPoun-EaFvSZJT-@G@TOioWzg5&$QBD-l3^1~mFM~sIzIPDW$IGGY2 z@%R&&M!Yp9{p91X^u|ahfCATST?*x>lUl)C8*sS*E6Y_OV7^u?*k_{9n*n^#YXd84 zoDv2$vM3;@w*s6_L%hcc*Z23%Fv#V4?O>_&Myf^dGR?&R#zJw}9s^?H^j|s@L#z-W z=YXUbRj|=!89+h0L3*WubV1(>kW7n!m|_QAtP{U1arkUWxhK5(ZNlE zbA;2rz@;L0u6z^pxz9Dy~{p!lTcvUAt;y6=V87A|wSI*K{c?PzzG6 zQ0zHaXOI(`P{2aoHcqUA_hQXus46wv0bHZ7zvmz=KrY1=dY8TX+cV0RO=YFAC^Eof zHo#{QhEXfdg8M%t2q=?YKx}v%kgQ=Ia<0HRCiyM Qny(A-8k>k%-;zn^58IO|ApigX diff --git a/__pycache__/assignment_2c.cpython-38.pyc b/__pycache__/assignment_2c.cpython-38.pyc deleted file mode 100644 index 1fb41e33680ba27d3f5ac9c5a199b296a077db1f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1160 zcmb7E&5qMB5O%u#$$AAsuo6gIh7)utt+e7)Ap}|^ZhI*!L@$*$cDL3hb`?9#rb=%- z1}}ib1Mm{OK(0ImNJxy`q+5-q;OrkzMG_!nM-5R9F6Qq`4TvL?{l$J|S*Q z|8c@9WVa)5nTp89 z1*IR5tZ{L68i8fk!oW)x8B2r}sR3p{s%2*BEjFgqL(lR7+zg-?z`9RqlEqdo<6;aq zZ~_J8awQE)>E3>=p_d>M^9aNG{P#_wL=_r@IAxVoMKl7W$T!1+V1<9Y&s<=4<3?D*L@$6 zO|NX1ow8f@c<`mY3Cj>`q_zG<0o#8FwXe$18*YOFiDLQ~Pz071!T(**23;>lJz)rp)^+e6GT7KA~Ta!8kHHPMO4r*XWRi~kb`|T=hSf|}B zQ+0sWRfrZobze#UunO`jxT%7o3f9xRwSkQMF`9-=6->h>|I?$!8bhA;>P)9DbH4li zesp25@