stcline / 5.4-The_Way_of_the_Program

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ€– 5.4 - The Way of the Program

πŸ€“ Overview and learning outcomes

The goal of this lab assignment is for you to begin creating your first custom Python programs on your Raspberry Pi. We will also begin to incorporate our Python textbook into our learning. This text is incredibly useful and free to use online. The processes of writing and running programs will be continually used for the remainder of our class.

The author of our text clearly explains why you should practice the programming activities while reading the text:

It is a good idea to read this book in front of a computer so you can try out the examples as you go. Whenever you are experimenting with a new feature, you should try to make mistakes. For example, in the β€œHello, world!” program, what happens if you leave out one of the quotation marks? What if you leave out both? What if you spell print wrong? This kind of experiment helps you remember what you read; it also helps when you are programming, because you get to know what the error messages mean. It is better to make mistakes now and on purpose than later and accidentally.

Keep this in mind as you move through the rest of these assignments.πŸš€

Background Study with Our Online Text

Completely read the section from our online text titled, The Way of the Program. Be sure to make note of the vocabulary and try out the examples. Your BASH command prompt may be used to call up a Python command prompt by typing pyhton.

Complete exercises 1 and 2.

Cloning This Repository and Submitting Work

We should continue to practice using Git as it is an essential part of code developement. For this and future assignments follow these steps:

  1. After accepting the repo, use git clone to clone your remote repo to the Pi.
  2. Make the modifications to the repo as described in the assignment.
  3. Use git add [file] to get the new file ready to commit.
  4. Use the git commit to make local changes to the repo and git push command to make changes to the online repo for grading. Be sure to include a commit message which describes the changes. All changes should be done by the due date of the assignment.

πŸ’» Terms to know

  • problem solving
  • high-level language
  • low-level language
  • portability
  • interpreter
  • prompt
  • program
  • print statement
  • operator
  • value
  • type
  • integer
  • floating-point
  • string
  • natural language
  • formal language
  • token
  • syntax
  • parse
  • bug
  • debugging

πŸ“ Next steps

  1. Using the NANO editor, create a markdown file in this repo called "Exercises.md". Record the answers to all of the questions in exercises 1 and 2 including the commands you typed into the Python interpreter of your Pi.
  2. Add the file to your repo, commit changes and push the new local repo to your online repo once you are done.

πŸ“š Resources

Online Text: Think Python: How to Think Like a Computer Scientist Git Cheat Sheet

About