Skip to content

Commit

Permalink
Pending changes exported from your codespace
Browse files Browse the repository at this point in the history
  • Loading branch information
JTomas88 committed Jul 11, 2024
1 parent 8a2bdab commit cb4f8a7
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 5 deletions.
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)
7 changes: 7 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,10 @@ 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)

print(square_area1)
print(square_area2)
print(square_area3)
2 changes: 2 additions & 0 deletions exercises/04-Defining-vs-Calling-a-function/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +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)
Expand Down
1 change: 1 addition & 0 deletions exercises/05-lambda-functions/app.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Your function here
is_odd = lambda numero : numero % 2 != 0

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
3 changes: 3 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,6 @@ 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)
3 changes: 2 additions & 1 deletion exercises/08-Function-parameters/app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Your code goes here:
def render_person(param):
def render_person(name, birth, eyes, age, gender):
param = f"{name} is a {age} years old {gender} born in {birth} with {eyes} eyes"
return param


Expand Down
4 changes: 3 additions & 1 deletion exercises/09-Array-Methods/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan']

## CREATE YOUR FUNCTION HERE

def sort_names (names):
names.sort()
return names

print(sort_names(names))

0 comments on commit cb4f8a7

Please sign in to comment.