Skip to content

Commit

Permalink
Add comments to emissions_calculation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
scm929 authored Feb 25, 2024
1 parent 9670673 commit 12386db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/calculation/emissions_calculation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This function is taking the km traveled by a jet and converting it to metric tons of CO2 emitted into the atmosphere. It assumes
# that all people are flying the same jet

def calculate_emissions(km_traveled):

#source: [https://flybitlux.com/what-is-the-carbon-footprint-of-a-private-jet/]
Expand All @@ -6,4 +9,4 @@ def calculate_emissions(km_traveled):
average_metric_tons_co2_emitted_per_km = 0.003045
metric_tons_co2_emitted = round(average_metric_tons_co2_emitted_per_km * km_traveled, 2)

return metric_tons_co2_emitted
return metric_tons_co2_emitted

0 comments on commit 12386db

Please sign in to comment.