The economy contracted by 0.3% in April after it shrank by 0.1% in March, official figures show.