Skip to content

Codespace symmetrical acorn jjjrrxj6w9j725p54 #63

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .learn/resets/01-Hello-World/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Your code here
6 changes: 6 additions & 0 deletions .learn/resets/02-What-is-a-function/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def sum(number1,number2):
return number1 + number2

# Your code here
total = sum(2,3)
print(total)
4 changes: 4 additions & 0 deletions .learn/resets/03-Call-a-function/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
def calculate_area(length, width):
return length * width

# Your code below this line
5 changes: 5 additions & 0 deletions .learn/resets/04-Defining-vs-Calling-a-function/app.py
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 2 additions & 0 deletions .learn/resets/05-lambda-functions/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Your function here

5 changes: 5 additions & 0 deletions .learn/resets/06-lambda-function-two/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@



# Your code above, please do not change code below
print(rapid("bob")) # Should print "bo"
7 changes: 7 additions & 0 deletions .learn/resets/07-Function-that-returns/app.py
Original file line number Diff line number Diff line change
@@ -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 ↓ #######
7 changes: 7 additions & 0 deletions .learn/resets/08-Function-parameters/app.py
Original file line number Diff line number Diff line change
@@ -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'))
6 changes: 6 additions & 0 deletions .learn/resets/09-Array-Methods/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan']

## CREATE YOUR FUNCTION HERE


print(sort_names(names))
1 change: 1 addition & 0 deletions exercises/01-Hello-World/app.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# Your code here
print("Hello World")
4 changes: 2 additions & 2 deletions exercises/02-What-is-a-function/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 3 additions & 0 deletions exercises/03-Call-a-function/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ 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)
7 changes: 4 additions & 3 deletions exercises/04-Defining-vs-Calling-a-function/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +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)
print(return_value)
return_value = multi(7,53812212)
print(return_value)
8 changes: 8 additions & 0 deletions exercises/05-lambda-functions/app.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# Your function here
is_odd = lambda numero: numero %2 == 0

# Declarando una función normal para una multiplicación
def multiply(p1, p2):
return p1 * p2

# Declarándola en una línea como una función lambda
multiply = lambda p1,p2: p1 * p2

2 changes: 1 addition & 1 deletion exercises/06-lambda-function-two/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

rapid = lambda str: str[:-1]


# Your code above, please do not change code below
Expand Down
9 changes: 9 additions & 0 deletions exercises/06-lambda-function-two/solution.hide.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@

# Your code above, please do not change code below
print(rapid("bob")) # Should print "bo"

# [n1:n2:n3]
# n1 --> donde empezamos a contar, si no ponemos nada empezamos desde el 0
# n2 --> hasta donde contamos. Será hasta el número anterior al que le digamos.
# Si el número es -1 nos referimos hasta el último elemento que haya.
#n3 --> cada cuanto contamos, cada numero, cada 2, cada 3, etc.

# [1:40:2] Empezamos a contar desde el número 1 hasta el número 39, y contaremos de 2 en 2

4 changes: 4 additions & 0 deletions exercises/07-Function-that-returns/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ 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)
4 changes: 2 additions & 2 deletions exercises/08-Function-parameters/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Your code goes here:
def render_person(param):
return param
def render_person(nombre, nacimiento, color, edad, genero):
return nombre + ' is a ' + str(edad) + ' years old ' + genero + ' born in ' + str(nacimiento) + ' with ' + color + ' eyes '


# Do not edit below this line
Expand Down
3 changes: 2 additions & 1 deletion exercises/09-Array-Methods/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan']

## CREATE YOUR FUNCTION HERE

def sort_names(arr):
return sorted(arr)

print(sort_names(names))
Loading