Skip to content

Commit e743df2

Browse files
committed
cambios
1 parent 112c416 commit e743df2

File tree

19 files changed

+79
-9
lines changed

19 files changed

+79
-9
lines changed

.learn/resets/01-Hello-World/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Your code here
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def sum(number1,number2):
2+
return number1 + number2
3+
4+
# Your code here
5+
total = sum(2,3)
6+
print(total)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
def calculate_area(length, width):
2+
return length * width
3+
4+
# Your code below this line
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Define below the function called "multi" that expects 2 parameters
2+
3+
# Don't edit anything below this line
4+
return_value = multi(7,53812212)
5+
print(return_value)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Your function here
2+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
4+
# Your code above, please do not change code below
5+
print(rapid("bob")) # Should print "bo"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def dollar_to_euro(dollar_value):
2+
return dollar_value * 0.91
3+
4+
def euro_to_yen(euro_value):
5+
return euro_value * 161.70
6+
7+
####### ↓ YOUR CODE BELOW ↓ #######
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Your code goes here:
2+
def render_person(param):
3+
return param
4+
5+
6+
# Do not edit below this line
7+
print(render_person('Bob', '05/22/1983', 'green', 23, 'male'))

.learn/resets/09-Array-Methods/app.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan']
2+
3+
## CREATE YOUR FUNCTION HERE
4+
5+
6+
print(sort_names(names))

exercises/01-Hello-World/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
# Your code here
2+
print("Hello World")

exercises/02-What-is-a-function/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ def sum(number1,number2):
22
return number1 + number2
33

44
# Your code here
5-
total = sum(2,3)
6-
print(total)
5+
super_duper = sum(3445324,53454423)
6+
print(super_duper)

exercises/03-Call-a-function/app.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ def calculate_area(length, width):
22
return length * width
33

44
# Your code below this line
5+
square_area1 = calculate_area(4,4)
6+
square_area2 = calculate_area(2,2)
7+
square_area3 = calculate_area(5,5)
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Define below the function called "multi" that expects 2 parameters
2-
2+
def multi(numero1, numero2):
3+
return(numero1 * numero2)
34
# Don't edit anything below this line
4-
return_value = multi(7,53812212)
5-
print(return_value)
5+
return_value = multi(7,53812212)
6+
print(return_value)

exercises/05-lambda-functions/app.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
# Your function here
2+
is_odd = lambda numero: numero %2 == 0
3+
4+
# Declarando una función normal para una multiplicación
5+
def multiply(p1, p2):
6+
return p1 * p2
7+
8+
# Declarándola en una línea como una función lambda
9+
multiply = lambda p1,p2: p1 * p2
210

exercises/06-lambda-function-two/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
rapid = lambda str: str[:-1]
22

33

44
# Your code above, please do not change code below

exercises/06-lambda-function-two/solution.hide.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@
22

33
# Your code above, please do not change code below
44
print(rapid("bob")) # Should print "bo"
5+
6+
# [n1:n2:n3]
7+
# n1 --> donde empezamos a contar, si no ponemos nada empezamos desde el 0
8+
# n2 --> hasta donde contamos. Será hasta el número anterior al que le digamos.
9+
# Si el número es -1 nos referimos hasta el último elemento que haya.
10+
#n3 --> cada cuanto contamos, cada numero, cada 2, cada 3, etc.
11+
12+
# [1:40:2] Empezamos a contar desde el número 1 hasta el número 39, y contaremos de 2 en 2
13+

exercises/07-Function-that-returns/app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ def euro_to_yen(euro_value):
55
return euro_value * 161.70
66

77
####### ↓ YOUR CODE BELOW ↓ #######
8+
euros = dollar_to_euro(137)
9+
yenes = euro_to_yen(euros)
10+
11+
print(yenes)

exercises/08-Function-parameters/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Your code goes here:
2-
def render_person(param):
3-
return param
2+
def render_person(nombre, nacimiento, color, edad, genero):
3+
return nombre + ' is a ' + str(edad) + ' years old ' + genero + ' born in ' + str(nacimiento) + ' with ' + color + ' eyes '
44

55

66
# Do not edit below this line

exercises/09-Array-Methods/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan']
22

33
## CREATE YOUR FUNCTION HERE
4-
4+
def sort_names(arr):
5+
return sorted(arr)
56

67
print(sort_names(names))

0 commit comments

Comments
 (0)