The problem asks for 2 completely different fashions. The primary, a job for these with intermediate…