Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

python Practicas 2 HeidyDB#67

New issue

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

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
HeidyDB wants to merge2 commits into4GeeksAcademy:master
base:master
Choose a base branch
Loading
fromHeidyDB:codespace-scaling-disco-jj769ww65vjrhqxp9
Open
Show file tree
Hide file tree
Changes fromall 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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
# Your code here
6 changes: 6 additions & 0 deletions.learn/resets/02-What-is-a-function/app.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
# Your function here

5 changes: 5 additions & 0 deletions.learn/resets/06-lambda-function-two/app.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionsexercises/01-Hello-World/app.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
# Your code here
print("Hello World")
4 changes: 2 additions & 2 deletionsexercises/02-What-is-a-function/app.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionsexercises/03-Call-a-function/app.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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)
2 changes: 2 additions & 0 deletionsexercises/04-Defining-vs-Calling-a-function/app.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
# Define below the function called "multi" that expects 2 parameters
def multi(a,b):
return a*b

# Don't edit anything below this line
return_value = multi(7,53812212)
Expand Down
2 changes: 1 addition & 1 deletionexercises/05-lambda-functions/app.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
# Your function here

is_odd =lambda num: num % 2 != 0
9 changes: 8 additions & 1 deletionexercises/06-lambda-function-two/app.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@

rapid = lambda stringP: stringP[:-1]


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


'''

Create a lambda function called rapid, which will take one string parameter.

Return the same string with the last letter removed.'''
5 changes: 3 additions & 2 deletionsexercises/08-Function-parameters/app.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
# Your code goes here:
def render_person(param):
return param
def render_person(name, date, color, age, gender):

return name + " is a " + str(age) + " years old " + gender + " born in " + date + " with " + color+ " eyes"


# Do not edit below this line
Expand Down
5 changes: 5 additions & 0 deletionsexercises/09-Array-Methods/app.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
names = ['John', 'Kenny', 'Tom', 'Bob', 'Dilan']

## CREATE YOUR FUNCTION HERE
def sort_names(names):
ordenada= sorted(names)
return ordenada




print(sort_names(names))

[8]ページ先頭

©2009-2025 Movatter.jp