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 Installing Python.

    2. Install PyCharm. See Installing an IDE.

    3. Install Git. See Installing Git.

  1. Fork the repository. See Forking the Repository.

  2. Clone the repository. See Cloning the Repository.

  3. Open your project in PyCharm. See Open Project in Pycharm.

  4. Try changing a file. See Change a File.

  5. Commit and push the updated program to BitBucket. See Commit Your Code.

  6. Great! Now let’s try programming something. Create and run a test program that prints Hello. See Printing “Hello World”. Make sure you take the time to learn how to “run” the program and see the output.

  7. Update your program to print something longer. Commit and push again. See Multiple Print Lines.

  8. Examine and try out different escape codes. See Escape Codes. (We’ll talk more about this later, if we haven’t yet.)

  9. Commit and push the updated program to GitHub. See Commit Your Code again.

  10. 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.

  11. 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.

  12. 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.

  13. Commit and push your lab.

  14. 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!