This is the code below: