-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from WincAcademy/main
Release 1.2.0
- Loading branch information
Showing
19 changed files
with
157 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,7 +1,8 @@ | ||
import json | ||
import os | ||
|
||
|
||
def get_countries(): | ||
module_path = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) | ||
data_fp = open(os.path.join(module_path, 'countries.json'), 'r') | ||
return json.load(data_fp)['countries'] | ||
data_fp = open(os.path.join(module_path, "countries.json"), "r") | ||
return json.load(data_fp)["countries"] |
This file contains 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
This file contains 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
This file contains 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,44 @@ | ||
# Do not modify these lines | ||
__winc_id__ = "7b9401ad7f544be2a23321292dd61cb6" | ||
__human_name__ = "arguments" | ||
|
||
# Add your code after this line | ||
|
||
# 1 | ||
|
||
|
||
def greet(name, greeting="Hello, <name>!"): | ||
new_greeting = greeting.replace("<name>", name) | ||
return new_greeting | ||
|
||
|
||
# 2 | ||
|
||
|
||
def force(mass, body="earth"): | ||
bodies = { | ||
"jupiter": 23.1, | ||
"neptune": 11.0, | ||
"saturn": 9.0, | ||
"earth": 9.8, | ||
"uranus": 8.7, | ||
"venus": 8.9, | ||
"mars": 3.7, | ||
"mercury": 3.7, | ||
"moon": 1.6, | ||
"pluto": 0.7, | ||
} | ||
|
||
force = mass * bodies[body] | ||
return force | ||
|
||
|
||
print(force(10, "moon")) | ||
|
||
|
||
# 3 | ||
|
||
|
||
def pull(m1, m2, d): | ||
G = 6.674 * 10**-11 | ||
return G * ((m1 * m2) / d**2) |
Oops, something went wrong.