News for hackers. Stuff that matters.
Re:Fungus breaks down ocean plastic by sage92 on Friday June 14, 2024 @01:05AM (#40677631)
```

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.

Re:Fungus breaks down ocean plastic by akie on Friday June 14, 2024 @01:09AM (#40677650)
That’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.
Re:Fungus breaks down ocean plastic by IanCal on Friday June 14, 2024 @04:07AM (#40678700)
It's also not reasonable to assume that a growing organism will break down a smaller amount of stuff every day.
Re:Fungus breaks down ocean plastic by jazzyjackson on Friday June 14, 2024 @02:40AM (#40678128)
it's chatgpt of course it's wrong
Re:Fungus breaks down ocean plastic by lanternfish on Friday June 14, 2024 @01:28AM (#40677763)
Review exponential functions.
Re:Fungus breaks down ocean plastic by bn-l on Friday June 14, 2024 @02:28AM (#40678073)
Yeah. Use the compounding interest rate function with the eat/expel/eat period.
Re:Fungus breaks down ocean plastic by tredigi on Friday June 14, 2024 @02:51AM (#40678182)
I hope you don't estimate the earnings from your investments that way.

But +1 on f-string use.