-
Notifications
You must be signed in to change notification settings - Fork 0
Home
5/10/2018:
- review functions
- introduce classes / object oriented programming
- Chapter 6 - Object Oriented Programming
5/08/2018:
- reviewed data types
- discussed dict type
- reviewed projects: blackjack & knights tour
- Chapter 2 - Mapping Types - dictionaries
5/03/2018:
- reviewed topics to date
- discussed projects - select 1:
-
blackjack
- use list to define deck
- use random.shuffle to shuffle the deck
- use pop() to deal a card
- extra credit: betting / economy features
- extra credit: double down, split features
-
knights tour
- implement a brute force knights tour using python:
https://en.wikipedia.org/wiki/Knight%27s_tour
- implement a brute force knights tour using python:
5/01/2018:
- sequence types: strings, lists, tuples
- functions - an introduction
- import code from other files - libraries
- Chapter 2 - Immutable Sequences - Strings, Tuples
- Chapter 2 - Mutable Sequences - Lists
- Chapter 4 - Functions
4/26/2018:
- looping - while / break / continue / else
- importing existing code - random
- string concatenation
- Project: guess a number (looping + random + track # of tries)
randomly select a number between 1-100
Ask user to guess a number
Cast user input into an int
Check user's number against hard coded number
If too low, print a message saying so
If too high, print a message saying so
If correct, print a congratulations message, print number of tries, and end
else, ask user to try again
- Chapter 3 - Looping
4/24/2018:
- Code in github review: goal: have a python file hosted in your github repo - synced with eclipse
- Build on boolean and boolean operators: decision making; If-then-else
- Casting: string to int
- input function
- Psuedo-code
- Project: guess a number (non-looping)
"Hard code" aka assign a number between 1-100 in your code
Ask user to guess a number
Cast user input into an int
Check user's number against hard coded number
If too low, print a message saying so
If too high, print a message saying so
If correct, print a congratulations message
- Chapter 3 - Conditional programming
4/19/2018:
-
Being pythonic - import this
-
Variables: numbers, strings; assignment operator, id operator, immutability
-
Types: int (+ - //-floored quotient /-true %-remainder * **), float, string, bool-int equivalency (and, not), None; Dynamic typing; **fractions; **decimals
-
Syntax – comments;
-
Pushing your code to git hub
- Chapter 1 - Guidelines on how to write good code
- Chapter 1 - The Python Culture
- Chapter 2 - Everything is an object
- Chapter 2 - Mutable or immutable? That is the question
- Chapter 2 - Numbers
4/17/2018:
- Get python, eclipse + pydev, and github setup
- If you need help with above, please reach out to me – I am sure we can get you setup with someone in building to get you caught up.
BOOK: http://techbus.safaribooksonline.com/book/programming/python/9781783551712