To find the value of R required to make the galvanometer measure up to 40 V, we can use the following formula for a series circuit involving a galvanometer
V = I ( R + r )
R =
V
I
- r
where R = resistance in series = ?, V = total voltage = 40V, I = current through galvanometer = 20Am = 0.02A and r = internal resistance = 10Ω