Battery-Status This code uses the psutil library to retrieve the battery status, and returns whether the battery is plugged or not and the percentage of the battery.