Hi Vishal !
Welcome to CodeRanch!
Apparently JShell provides more accurate report.
You should address your question to the creators of the online service, indeed there are more problems than 2.
Also, I am not sure if exam really will ask you questions like: how many lines are invalid (at least there was no such
pattern on older exams)
Best regards,
MZ