From 7a1497f76398d54f30ae800c57b69c025f3a3881 Mon Sep 17 00:00:00 2001 From: remelop03 Date: Fri, 11 Oct 2024 16:24:10 +0000 Subject: [PATCH 1/6] 01 Hello World --- .learn/resets/01-Hello-World/app.py | 1 + exercises/01-Hello-World/app.py | 1 + 2 files changed, 2 insertions(+) create mode 100644 .learn/resets/01-Hello-World/app.py diff --git a/.learn/resets/01-Hello-World/app.py b/.learn/resets/01-Hello-World/app.py new file mode 100644 index 0000000..fce62c1 --- /dev/null +++ b/.learn/resets/01-Hello-World/app.py @@ -0,0 +1 @@ +# Your code here diff --git a/exercises/01-Hello-World/app.py b/exercises/01-Hello-World/app.py index fce62c1..0ec004e 100644 --- a/exercises/01-Hello-World/app.py +++ b/exercises/01-Hello-World/app.py @@ -1 +1,2 @@ # Your code here +print("Hello World") From 7bcb05c1bf9ce95dd2b1fe5bb9c00e88af11cc70 Mon Sep 17 00:00:00 2001 From: remelop03 Date: Fri, 11 Oct 2024 16:26:35 +0000 Subject: [PATCH 2/6] What is a fuction --- .learn/resets/02-What-is-a-function/app.py | 6 ++++++ exercises/02-What-is-a-function/app.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .learn/resets/02-What-is-a-function/app.py diff --git a/.learn/resets/02-What-is-a-function/app.py b/.learn/resets/02-What-is-a-function/app.py new file mode 100644 index 0000000..efeec63 --- /dev/null +++ b/.learn/resets/02-What-is-a-function/app.py @@ -0,0 +1,6 @@ +def sum(number1,number2): + return number1 + number2 + +# Your code here +total = sum(2,3) +print(total) diff --git a/exercises/02-What-is-a-function/app.py b/exercises/02-What-is-a-function/app.py index efeec63..a313431 100755 --- a/exercises/02-What-is-a-function/app.py +++ b/exercises/02-What-is-a-function/app.py @@ -2,5 +2,5 @@ def sum(number1,number2): return number1 + number2 # Your code here -total = sum(2,3) -print(total) +super_duper = sum(3445324,53454423) +print(super_duper) From 0ff13c1f33ce1bbe88334da3dbf3059c8a386fcb Mon Sep 17 00:00:00 2001 From: remelop03 Date: Fri, 11 Oct 2024 16:31:58 +0000 Subject: [PATCH 3/6] 03 Calling a Funtion --- .learn/resets/03-Call-a-function/app.py | 4 ++++ exercises/03-Call-a-function/app.py | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 .learn/resets/03-Call-a-function/app.py diff --git a/.learn/resets/03-Call-a-function/app.py b/.learn/resets/03-Call-a-function/app.py new file mode 100644 index 0000000..0c131b3 --- /dev/null +++ b/.learn/resets/03-Call-a-function/app.py @@ -0,0 +1,4 @@ +def calculate_area(length, width): + return length * width + +# Your code below this line diff --git a/exercises/03-Call-a-function/app.py b/exercises/03-Call-a-function/app.py index 0c131b3..4ef6d5b 100755 --- a/exercises/03-Call-a-function/app.py +++ b/exercises/03-Call-a-function/app.py @@ -2,3 +2,10 @@ def calculate_area(length, width): return length * width # Your code below this line +square_area1=calculate_area(4,4) +square_area2=calculate_area(2,2) +square_area3=calculate_area(5,5) + +print(square_area1) +print(square_area2) +print(square_area3) From 9a9123472a8a53cf0e3cbb5f1b31a425c0f5896e Mon Sep 17 00:00:00 2001 From: remelop03 Date: Fri, 11 Oct 2024 16:37:44 +0000 Subject: [PATCH 4/6] 04 Defining vs Calling a Function --- .learn/resets/04-Defining-vs-Calling-a-function/app.py | 5 +++++ exercises/04-Defining-vs-Calling-a-function/app.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .learn/resets/04-Defining-vs-Calling-a-function/app.py diff --git a/.learn/resets/04-Defining-vs-Calling-a-function/app.py b/.learn/resets/04-Defining-vs-Calling-a-function/app.py new file mode 100644 index 0000000..eedeae6 --- /dev/null +++ b/.learn/resets/04-Defining-vs-Calling-a-function/app.py @@ -0,0 +1,5 @@ +# Define below the function called "multi" that expects 2 parameters + +# Don't edit anything below this line +return_value = multi(7,53812212) +print(return_value) diff --git a/exercises/04-Defining-vs-Calling-a-function/app.py b/exercises/04-Defining-vs-Calling-a-function/app.py index eedeae6..42c6029 100755 --- a/exercises/04-Defining-vs-Calling-a-function/app.py +++ b/exercises/04-Defining-vs-Calling-a-function/app.py @@ -1,5 +1,6 @@ # Define below the function called "multi" that expects 2 parameters - +def multi(a,b): + return a*b # Don't edit anything below this line return_value = multi(7,53812212) print(return_value) From fcb64678bf371f44801b0bb948c3c2f9e6db0788 Mon Sep 17 00:00:00 2001 From: remelop03 Date: Fri, 11 Oct 2024 16:45:02 +0000 Subject: [PATCH 5/6] 05 Lambda Functions in Python --- .learn/resets/05-lambda-functions/app.py | 2 ++ exercises/05-lambda-functions/app.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .learn/resets/05-lambda-functions/app.py diff --git a/.learn/resets/05-lambda-functions/app.py b/.learn/resets/05-lambda-functions/app.py new file mode 100644 index 0000000..b4ac556 --- /dev/null +++ b/.learn/resets/05-lambda-functions/app.py @@ -0,0 +1,2 @@ +# Your function here + diff --git a/exercises/05-lambda-functions/app.py b/exercises/05-lambda-functions/app.py index b4ac556..0f8630e 100755 --- a/exercises/05-lambda-functions/app.py +++ b/exercises/05-lambda-functions/app.py @@ -1,2 +1,3 @@ # Your function here - +is_odd=lambda x : x % 2 !=0 +print(is_odd(3)) From 5bba0dcc572aae8f968c9214c005870896025849 Mon Sep 17 00:00:00 2001 From: remelop03 Date: Sat, 12 Oct 2024 00:58:17 +0000 Subject: [PATCH 6/6] 09 List Methods --- .learn/resets/06-lambda-function-two/app.py | 5 +++++ .learn/resets/07-Function-that-returns/app.py | 7 +++++++ .learn/resets/08-Function-parameters/app.py | 7 +++++++ .learn/resets/09-Array-Methods/app.py | 6 ++++++ exercises/06-lambda-function-two/app.py | 2 +- exercises/07-Function-that-returns/app.py | 4 ++++ exercises/08-Function-parameters/app.py | 4 ++-- exercises/09-Array-Methods/app.py | 4 +++- 8 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 .learn/resets/06-lambda-function-two/app.py create mode 100644 .learn/resets/07-Function-that-returns/app.py create mode 100644 .learn/resets/08-Function-parameters/app.py create mode 100644 .learn/resets/09-Array-Methods/app.py diff --git a/.learn/resets/06-lambda-function-two/app.py b/.learn/resets/06-lambda-function-two/app.py new file mode 100644 index 0000000..a156102 --- /dev/null +++ b/.learn/resets/06-lambda-function-two/app.py @@ -0,0 +1,5 @@ + + + +# Your code above, please do not change code below +print(rapid("bob")) # Should print "bo" diff --git a/.learn/resets/07-Function-that-returns/app.py b/.learn/resets/07-Function-that-returns/app.py new file mode 100644 index 0000000..fc81947 --- /dev/null +++ b/.learn/resets/07-Function-that-returns/app.py @@ -0,0 +1,7 @@ +def dollar_to_euro(dollar_value): + return dollar_value * 0.91 + +def euro_to_yen(euro_value): + return euro_value * 161.70 + +####### ↓ YOUR CODE BELOW ↓ ####### diff --git a/.learn/resets/08-Function-parameters/app.py b/.learn/resets/08-Function-parameters/app.py new file mode 100644 index 0000000..71294e0 --- /dev/null +++ b/.learn/resets/08-Function-parameters/app.py @@ -0,0 +1,7 @@ +# Your code goes here: +def render_person(param): + return param + + +# Do not edit below this line +print(render_person('Bob', '05/22/1983', 'green', 23, 'male')) \ No newline at end of file diff --git a/.learn/resets/09-Array-Methods/app.py b/.learn/resets/09-Array-Methods/app.py new file mode 100644 index 0000000..9d60f6b --- /dev/null +++ b/.learn/resets/09-Array-Methods/app.py @@ -0,0 +1,6 @@ +names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan'] + +## CREATE YOUR FUNCTION HERE + + +print(sort_names(names)) diff --git a/exercises/06-lambda-function-two/app.py b/exercises/06-lambda-function-two/app.py index a156102..3e5f3ca 100755 --- a/exercises/06-lambda-function-two/app.py +++ b/exercises/06-lambda-function-two/app.py @@ -1,4 +1,4 @@ - +rapid=lambda string: string [:-1] # Your code above, please do not change code below diff --git a/exercises/07-Function-that-returns/app.py b/exercises/07-Function-that-returns/app.py index fc81947..b4051bb 100755 --- a/exercises/07-Function-that-returns/app.py +++ b/exercises/07-Function-that-returns/app.py @@ -5,3 +5,7 @@ def euro_to_yen(euro_value): return euro_value * 161.70 ####### ↓ YOUR CODE BELOW ↓ ####### + +euros=dollar_to_euro(137) +yen=euro_to_yen(euros) +print(yen) \ No newline at end of file diff --git a/exercises/08-Function-parameters/app.py b/exercises/08-Function-parameters/app.py index 71294e0..b7fb603 100755 --- a/exercises/08-Function-parameters/app.py +++ b/exercises/08-Function-parameters/app.py @@ -1,6 +1,6 @@ # Your code goes here: -def render_person(param): - return param +def render_person(name,birthdate,color,age,gender): + return f"{name} is a {age} years old {gender} born in {birthdate} with {color} eyes" # Do not edit below this line diff --git a/exercises/09-Array-Methods/app.py b/exercises/09-Array-Methods/app.py index 9d60f6b..726de98 100755 --- a/exercises/09-Array-Methods/app.py +++ b/exercises/09-Array-Methods/app.py @@ -1,6 +1,8 @@ names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan'] ## CREATE YOUR FUNCTION HERE - +def sort_names(list): + sorted_list=sorted(list) + return sorted_list print(sort_names(names))