My code is giving exact the same output as he shown in the attachment.