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/.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/.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/.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/.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/.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/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") diff --git a/exercises/02-What-is-a-function/app.py b/exercises/02-What-is-a-function/app.py index efeec63..4447268 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) \ No newline at end of file diff --git a/exercises/03-Call-a-function/app.py b/exercises/03-Call-a-function/app.py index 0c131b3..9efde40 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) diff --git a/exercises/04-Defining-vs-Calling-a-function/app.py b/exercises/04-Defining-vs-Calling-a-function/app.py index eedeae6..a8baafa 100755 --- a/exercises/04-Defining-vs-Calling-a-function/app.py +++ b/exercises/04-Defining-vs-Calling-a-function/app.py @@ -1,4 +1,6 @@ # Define below the function called "multi" that expects 2 parameters +def multi(numero1, numero2): + return numero1 * numero2 # Don't edit anything below this line return_value = multi(7,53812212) diff --git a/exercises/05-lambda-functions/app.py b/exercises/05-lambda-functions/app.py index b4ac556..555fb20 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 numero : numero % 2 != 0 diff --git a/exercises/06-lambda-function-two/app.py b/exercises/06-lambda-function-two/app.py index a156102..35d5b60 100755 --- a/exercises/06-lambda-function-two/app.py +++ b/exercises/06-lambda-function-two/app.py @@ -1,4 +1,4 @@ - +rapid = lambda str : str [:-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..75f4022 100755 --- a/exercises/07-Function-that-returns/app.py +++ b/exercises/07-Function-that-returns/app.py @@ -5,3 +5,6 @@ def euro_to_yen(euro_value): return euro_value * 161.70 ####### ↓ YOUR CODE BELOW ↓ ####### +euros = (dollar_to_euro(137)) +yenes = euro_to_yen(euros) +print(yenes) diff --git a/exercises/08-Function-parameters/app.py b/exercises/08-Function-parameters/app.py index 71294e0..14cf7f9 100755 --- a/exercises/08-Function-parameters/app.py +++ b/exercises/08-Function-parameters/app.py @@ -1,5 +1,6 @@ # Your code goes here: -def render_person(param): +def render_person(name, birth, eyes, age, gender): + param = f"{name} is a {age} years old {gender} born in {birth} with {eyes} eyes" return param diff --git a/exercises/09-Array-Methods/app.py b/exercises/09-Array-Methods/app.py index 9d60f6b..24c7d58 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 (names): + names.sort() + return names print(sort_names(names)) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy