Before we begin diving deep into code, it is important to make sure that we go over the proper steps involved in completing labs on Learn. In this lab (yep, this is a lab!), we will be introducing those steps.
On Learn, labs are lessons with tests. The difficulty level of labs will vary, but they all follow the same core steps. To start any lab, if you are using the Learn IDE, you must first either click "Open IDE" (or, if you are using your own local set up, fork and clone this repository). This will make a personal copy of the lab for you to work on. Once you've opened up your development environment, follow the steps below:
learnand press enter
learnagain to see if progress has been made
learn submitto submit your code
Whether you are using the in-browser Learn IDE, the standalone Learn IDE or your own local set up, these core steps will always be the same for passing labs. Don't be alarmed if you don't understand everything that prints out in the terminal just yet. The main thing to look for is the breakdown of failed tests:
Your First Learn Lab contains a file called "my-new-file.txt" (FAILED -1) Failures: 1) Your First Learn Lab...
Each failed test will appear in order. It is recommended that you start from the first (the top most) test failure and work your way through until all tests are passing.
For the final step, when you run
learn submit, the work you've completed is
sent back, learn.co is notified, registers that you've sent in your work and
marks that you have completed the lab.
The best way to understand the workflow described above is to apply it! There is
one test in this lab. In order to pass the test, follow the numbered steps above. The
first time you run
learn, the test will fail, but the resulting message will
provide information about how to pass.
When you've passed the test, run
That's it, you're done! Again, lab difficulty will vary greatly depending on the learning goals within them. Some will be more guided, as you are introduced to new concepts. In these, test messages may tell you exactly what you need to do. Some labs are built specifically to test your problem solving skills. The test messages in these labs may be more ambiguous, requiring you to try a variety of possible solutions.
When you've successfully passed the tests and run
learn submit, on learn.co,
all lights for this lesson will turn green and you can continue on with the