5 ms·
``` total_plastic = 8.3e9 # total plastic in tons degradation_rate = 0.05 # degradation rate per day in percentage # Calculation of daily degradation in t
by sage92 2y ago
```
total_plastic = 8.3e9 # total plastic in tons
degradation_rate = 0.05 # degradation rate per day in percentage
# Calculation of daily degradation in tons
daily_degradation = total_plastic * degradation_rate / 100
# Estimation of time taken to degrade all plastic in days
total_days = total_plastic / daily_degradation
# Conversion of total days to years
total_years = total_days / 365
# Print the result
print(f"It would take approximately {total_years:.2f} years to degrade all the plastic.")
```
It would take approximately 5.48 years to degrade all the plastic.
- akie 2y agoThat’s… wrong? The amount of plastic would decrease every day (assuming no new production), so 0.05% of that amount would not be a constant number. Your daily_degradation is incorrect.
- jazzyjackson 2y agoit's chatgpt of course it's wrong
- IanCal 2y agoIt's also not reasonable to assume that a growing organism will break down a smaller amount of stuff every day.
- lanternfish 2y agoReview exponential functions.
- arresin 2y agoYeah. Use the compounding interest rate function with the eat/expel/eat period.
- tredigi 2y agoI hope you don't estimate the earnings from your investments that way. But +1 on f-string use.