Complete the code to initialize the battery voltage variable.
battery_voltage = [1]The battery voltage should be a numeric value representing volts, so 12.6 is correct.
Complete the code to check if the battery voltage is below the warning level.
if battery_voltage [1] 11.1: print('Warning: Low battery')
We want to warn if voltage is less than 11.1 volts, so the operator is <.
Fix the error in the code to calculate remaining battery percentage.
remaining_percentage = (battery_voltage [1] 11.1) / (12.6 - 11.1) * 100
We subtract 11.1 from battery_voltage to find how much voltage is left above the warning level.
Fill both blanks to create a dictionary of battery status for each cell.
cell_status = {cell: voltage[1] for cell, voltage in battery_cells.items() if voltage [2] 3.7}We subtract 3.7 to find voltage difference per cell and filter cells with voltage greater than 3.7.
Fill both blanks to create a dictionary of cells with voltage drop over threshold.
voltage_drop = {cell: voltage[1] 3.7 for cell, voltage in battery_cells.items() if voltage[2] 3.5}Use ':' to map cell to voltage difference, subtract 3.7 to get drop, and filter cells with voltage greater than 3.5.
