Given that M is the mass of substance deposited in an electrolysis and Q the…