Skip to content

Commit

Permalink
#4 Add endpoint for calculating the force of gravity
Browse files Browse the repository at this point in the history
  • Loading branch information
LeNPaul committed May 1, 2020
1 parent ab3a429 commit 1b4d4dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -15,3 +15,7 @@ def random(size):
for x in range(0, int(size)):
randList.append(randint(0,20))
return jsonify(randList)

@app.route('/gravity/<distance>')
def gravity(distance):
return jsonify(1 * 10 * 10 / float(distance)**2)

0 comments on commit 1b4d4dd

Please sign in to comment.