Question: Tasks: Proposal: Identify a problem that we face with the enormity of greenhouse emissions and its effect on global warming. You should identify a specificproblem

Tasks:
Proposal: Identify a problem that we face with the enormity of greenhouse emissions and its effect on global warming. You should identify a specificproblem thatcan be addressed in asmallapplication, working prototypeor a proof of concept. Write a proposal (approximately one to two pages) listing your group members and your selected problem.Include multiple (two to four) strategies for addressing the problem.Strategies can include solutions that are not possible yet.Propose one or more solutions for each strategy.Include the benefits and disadvantages of each solution. Indicate whichsolutionyourteamwillimplement andwhyit was selected.Foryoursolution,identify whatwillbe theinput(s)(forexample,files,ausertyping,etc.) andwhatwillbetheoutput(s).
Write based on the code below using Greenhouse gas emissions as the chosen solution
#This script helps users reduce their vehicle greenhouse gas emissions by recommending strategies.
#Inputs: Current vehicle emissions data (in grams per kilometer).
#Outputs: Recommended strategies and potential emission savings.
def calculate_emission_savings(current_emissions, strategy_factor):
# Calculate potential emission savings based on current emissions and strategy factor.
# Parameters:
# current_emissions (float): The current emissions in grams per kilometer.
# strategy_factor (float): The reduction factor for the chosen strategy.
# Returns:
# float: Potential emission savings.
return current_emissions * strategy_factor
def main():
print("Welcome to the Greenhouse Gas Emission Reduction Tool")
while True: # Loop to keep the program running
try:
# Get user input for current emissions
current_emissions = float(input("Enter your vehicle's current emissions (grams/km): "))
# Available strategies and their reduction factors
strategies ={
"Carpooling": 0.20, # 20% reduction
"Public Transport": 0.30 # 30% reduction
}
print("
Available Strategies:")
for strategy in strategies:
print(f"-{strategy}")
# Get user choice for strategy
choice = input("Choose a strategy (Carpooling/Public Transport) or type 'exit' to quit: ").strip()
if choice.lower()== 'exit': # Exit the loop if user types 'exit'
print("Thank you for using the tool!")
break
if choice in strategies:
# Calculate emission savings based on chosen strategy
savings = calculate_emission_savings(current_emissions, strategies[choice])
print(f"
By adopting {choice}, you can reduce your emissions by {savings:.2f} grams/km.
")
else:
print("Invalid choice. Please choose a valid strategy.
")
except ValueError:
print("Invalid input. Please enter a numeric value for emissions.
")
if __name__=="__main__":
main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!