- Notifications
You must be signed in to change notification settings - Fork250
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:masterChoose a base branch fromHeidyDB:codespace-scaling-disco-jj769ww65vjrhqxp9
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Open
Changes fromall commits
Commits
Show all changes
2 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions.learn/resets/01-Hello-World/app.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
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 deletionsexercises/01-Hello-World/app.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
# Your code here | ||
print("Hello World") |
4 changes: 2 additions & 2 deletionsexercises/02-What-is-a-function/app.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletionsexercises/03-Call-a-function/app.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletionsexercises/04-Defining-vs-Calling-a-function/app.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionexercises/05-lambda-functions/app.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletionsexercises/09-Array-Methods/app.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff 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)) |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.