A random variable N has a cumulative distribution function given by

F(x)={ 0 for x<1
0.2 for 1<=x<2
0.5 for 2<=x<3
0.8 for 3<=x<4
1 for 4<=x
Find the mean of N.

The average would be the area under the cumulative distribution, divided by its width. Your last statement,

F(x) = 1 for 4<=x, disagrees with all previous statements.

You will need to resolve that.