Skip to content

HFP CH 1

Jacob Amey edited this page Aug 19, 2013 · 1 revision

Chapter 1 - Finding your way

(Starting to code)

35 Pages Long

Description:

Chapter 1 jumped right in to Variables and basic if/else branch statements. It literally covered the primary basis to write most small and simple programs that you would need in a scripting type work environment. While going over the Base of programing it covered basic information about python, How its Interpreted and the IDLE application.

The Code:

The coding was all based around a Guessing game. in the beginning you form a very crude version that works but is not satisfying. Through out the chapter you learn new pieces that allow you to gradually make the game better and by the end is actually very fun. My wife enjoyed it enough to run the game about 50 times.

Main Concepts Covered:

  1. programs are created from code statements. - commands do things. - branches decide things. - loops repeat things.
  2. Conditionals help you decide if something is True or False.
  3. Assignment sets a name to a value.
  4. A named value is stored in a "variable".

Python Tools Covered:

  • if/else - branches
  • while - loops
  • = - assignment operator
  • == - equality operator
  • != - inequality operator
  • > - greater than operator
  • print() - displays a message on screen
  • input() - gets and returns user input
  • int() - converts characters to numbers
  • randint() - produces a random number
Clone this wiki locally