10 NOV 2025

Battery drain prediction script

I created a optimised script to predict the battery drain of 3 IOT devices, the script takes the amount of hours the user wants to predict and then loops while taking the battery drain away each time

Python

Requirements

As this code was for an assignment, the requirements were quite simple:

Constraints

For this project, the only constraint was time. This is because I already know how to write in Python and the requirements were very simple.

The code

Code

Conclusion

This project went well and gave me a reason to write more Python, which I enjoyed. It also gave me the opportunity to use a Python dictionary, which I had not used before.