Included code to answer task c).