diff --git a/exercises/02-Hello-World/app.py b/exercises/02-Hello-World/app.py index 801de24..a7b3217 100644 --- a/exercises/02-Hello-World/app.py +++ b/exercises/02-Hello-World/app.py @@ -1 +1,2 @@ -# your code here \ No newline at end of file +# your code here +print("Hello World") \ No newline at end of file diff --git a/exercises/03-What-is-a-function/app.py b/exercises/03-What-is-a-function/app.py index 551610b..9fbc220 100755 --- a/exercises/03-What-is-a-function/app.py +++ b/exercises/03-What-is-a-function/app.py @@ -1,8 +1,8 @@ def sum(number1,number2): return number1 + number2 -total = sum(2,3) -print(total) +super_duper = sum(3445324,53454423) +print(super_duper) diff --git a/exercises/04-Call-a-function/app.py b/exercises/04-Call-a-function/app.py index c856d48..5476dd9 100755 --- a/exercises/04-Call-a-function/app.py +++ b/exercises/04-Call-a-function/app.py @@ -1,4 +1,11 @@ def calculate_area(length,edge): return length * edge -# Your code Below this line: \ No newline at end of file +# 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) \ No newline at end of file diff --git a/exercises/05-Defining-vs-Calling-a-function/app.py b/exercises/05-Defining-vs-Calling-a-function/app.py index 79b86d8..7b562c9 100755 --- a/exercises/05-Defining-vs-Calling-a-function/app.py +++ b/exercises/05-Defining-vs-Calling-a-function/app.py @@ -1,5 +1,6 @@ # Define 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) \ No newline at end of file diff --git a/exercises/06-lambda-functions/app.py b/exercises/06-lambda-functions/app.py index e59626e..28b1d34 100755 --- a/exercises/06-lambda-functions/app.py +++ b/exercises/06-lambda-functions/app.py @@ -1,2 +1,4 @@ # your function here +is_odd = lambda num: num % 2 != 0 +print(is_odd(2)) \ No newline at end of file diff --git a/exercises/07-lambda-function-two/app.py b/exercises/07-lambda-function-two/app.py index fca265d..225afe9 100755 --- a/exercises/07-lambda-function-two/app.py +++ b/exercises/07-lambda-function-two/app.py @@ -1,5 +1,5 @@ - +rapid = lambda name: name[:-1] # From this line above, plese do not change code below -print(rapid("bob")) #should print bo \ No newline at end of file +print(rapid("jesus")) #should print bo \ No newline at end of file diff --git a/exercises/08-Function-that-returns/app.py b/exercises/08-Function-that-returns/app.py index 44ab611..e0e2271 100755 --- a/exercises/08-Function-that-returns/app.py +++ b/exercises/08-Function-that-returns/app.py @@ -4,4 +4,8 @@ def dollar_to_euro(dollar_value): def euro_to_yen(euro_value): return euro_value * 124.15 -####### ↓ YOUR CODE BELOW ↓ ####### \ No newline at end of file +####### ↓ YOUR CODE BELOW ↓ ####### + +enEuros = dollar_to_euro(137) +enYen=euro_to_yen(enEuros) +print(enYen) \ No newline at end of file diff --git a/exercises/09-Function-parameters/app.py b/exercises/09-Function-parameters/app.py index 71294e0..b881509 100755 --- a/exercises/09-Function-parameters/app.py +++ b/exercises/09-Function-parameters/app.py @@ -1,5 +1,6 @@ # Your code goes here: -def render_person(param): +def render_person(a,b,c,d,e): + param = str(a)+" is a "+str(d)+" years old "+str(e)+" born in "+str(b)+" with "+str(c)+" eyes" return param diff --git a/exercises/10-Array-Methods/app.py b/exercises/10-Array-Methods/app.py index fdddc23..a0a6972 100755 --- a/exercises/10-Array-Methods/app.py +++ b/exercises/10-Array-Methods/app.py @@ -1,5 +1,7 @@ names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan'] ## CREATE YOUR FUNCTION HERE - +def sort_names(listado): + listado.sort() + return listado print(sort_names(names))