How to use labs on Github

I am new to this platform and also have never used GitHub in my life. So I’m kind of stuck on the very first lab of learn python programming lab.

My questions are :

How do these lab assignments work?
If I completed a lab , how can I check if my code is right?
How to test my code on GitHub with test cases given?

Please help!