Skip to content

Commit 5bba0dc

Browse files
committed
09 List Methods
1 parent fcb6467 commit 5bba0dc

File tree

8 files changed

+35
-4
lines changed

8 files changed

+35
-4
lines changed
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/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 string: string [:-1]
22

33

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

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+
9+
euros=dollar_to_euro(137)
10+
yen=euro_to_yen(euros)
11+
print(yen)

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(name,birthdate,color,age,gender):
3+
return f"{name} is a {age} years old {gender} born in {birthdate} with {color} eyes"
44

55

66
# Do not edit below this line

exercises/09-Array-Methods/app.py

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

33
## CREATE YOUR FUNCTION HERE
4-
4+
def sort_names(list):
5+
sorted_list=sorted(list)
6+
return sorted_list
57

68
print(sort_names(names))

0 commit comments

Comments
 (0)