.. _lab-01: Lab 1: First Program ==================== Follow these step-by-step instructions. Note that a lot of the instructions link to a different site. I'd recommend opening those links in a different tab on your browser. That way you don't lose your spot on what lab step you are on. 1. If you are installing on your own computer: 1. Install Python and set up the libraries. See :ref:`installing-python`. 2. Install PyCharm. See :ref:`installing-pycharm`. 3. Install Git. See :ref:`installing-git`. 4. Fork the repository. See :ref:`fork-repository`. 5. Clone the repository. See :ref:`clone-repository`. 6. Open your project in PyCharm. See :ref:`open-in-pycharm`. 7. Try changing a file. See :ref:`change_file`. 8. Commit and push the updated program to BitBucket. See :ref:`commit`. 9. Great! Now let's try programming something. Create and run a test program that prints ``Hello``. See :ref:`print-hello-world`. Make sure you take the time to learn how to "run" the program and see the output. 10. Update your program to print something longer. Commit and push again. See :ref:`print-multiple-lines`. 11. Examine and try out different **escape codes**. See :ref:`escape-codes`. (We'll talk more about this later, if we haven't yet.) 12. Commit and push the updated program to GitHub. See :ref:`commit` again. 13. Now is the time to work on Lab 01. Make sure you are working in the Lab 01 folder, with the ``lab_01.py`` file. 14. Make the lab *yours*. Figure out something of your own to print. Don't just use my examples. * Make sure what you print uses proper English. Write in complete sentences, capitalize words appropriately, use punctuation where needed. * Make it longer than one line. Use at *least* four ``print`` statements. While ``print`` statements can span more than one line, have at least four different statements. * Also include at least one escape code. 15. Try running your lab. If you see the old "test" program running instead, right click on your program and tell it you want it to run ``lab_01.py`` not the other program. 16. Commit and push your lab. 17. Find your lab in on GitHub. Go to "source" and find the directory it is in. Copy the URL, submit for grading. Before turning in your program, double-check: * Did you put the code in ``lab_01.py`` in the Lab 1 folder? * Did you remove the sample prints shown above, and make up your own print statements? At least four lines? * Does the program use proper spelling, capitalization, and grammar in the text that you printed to the screen? (Seriously, make sure what you print out has periods and capital letters.) * Does the program use at least one escape code? Also, remember you don't have to put spaces around escape codes. So do this: ``"\tIndented with a tab"`` not ``"\t Indented with a tab"`` because the space after the t isn't needed unless you want both a tab and an extra space. * Hover over the PyCharm "hints" that are on the right side of your editor to see if there are suggestions on how to make your code better. * Can you find the code in GitHub? * Have you copied the URL and turned it in to Scholar? (Find the Lab 01 link on Scholar.) Congratulations, you are done!