Skip to content

Commit 3f63434

Browse files
committed
van
1 parent c914a7b commit 3f63434

File tree

9 files changed

+26
-8
lines changed

9 files changed

+26
-8
lines changed

exercises/02-Hello-World/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
# your code here
1+
# your code here
2+
print("Hello World")

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

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

44
total = sum(2,3)
5+
super_duper = sum(3445324,53454423)
56
print(total)
7+
print(super_duper)

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
def calculate_area(length,edge):
22
return length * edge
33

4-
# Your code Below this line:
4+
# Your code Below this line:
5+
area = calculate_area(3,6)
6+
print(area)
7+
8+
square_area1 = calculate_area(4,4)
9+
square_area2 = calculate_area(2,2)
10+
square_area3 = calculate_area(5,5)
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Define the function called "multi" that expects 2 parameters:
2-
2+
def multi(a,b):
3+
return a*b
34
# don't edit anything below this line
45
return_value = multi(7,53812212)
56
print(return_value)

exercises/06-lambda-functions/app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
# your function here
2+
is_odd = lambda num: (num % 2) != 0
23

4+
5+
# Esta función retorna `True` si el número es impar
6+
#def is_odd(num):
7+
# return (num % 2) != 0
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
1+
rapid = lambda a : a[:-1]
32

43
# From this line above, plese do not change code below
54
print(rapid("bob")) #should print bo

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ def dollar_to_euro(dollar_value):
44
def euro_to_yen(euro_value):
55
return euro_value * 124.15
66

7-
####### ↓ YOUR CODE BELOW ↓ #######
7+
8+
####### ↓ YOUR CODE BELOW ↓ #######
9+
print(euro_to_yen(dollar_to_euro(137)))

exercises/09-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, fecha, ojos, edad, sexo):
3+
return nombre + ' is a ' + str(edad) + ' years old ' + sexo + ' born in ' + fecha + ' with ' + ojos + ' eyes'
44

55

66
# Do not edit below this line

exercises/10-Array-Methods/app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan']
22
## CREATE YOUR FUNCTION HERE
33

4+
def sort_names(a):
5+
return a
46

57
print(sort_names(names))

0 commit comments

Comments
 (0)