I would like some help with a problem presented in this video:

The problem is titled "Extra Credit" and it is near the very end of the video.

I managed to complete the first problem, but this one seems a lot harder and I'm not sure where to begin?>

Any help is appreciated! Thank you.

Please tell me if homework help is not allowed.

Post your first code
it should'nt be too different

so according to your code a help will be given :)