    Here are the screenshots of the error and the code.Any help would be appreciated