Basic Programming in Python - Notes
Basic Programming in Python - Notes
Class Goals
Potential Uses
Automation
Data collection and processing
Money
Animation
Gaming
Machine Learning Python is the language for this
Programming as a skill
Taking the larger problem, and figuring out the individual steps
You should already have an idea of how to do this
Example: writing an essay
Start
Taking the steps you found when breaking down the problem, and
Language specific
Fairly straightforward if you did the previous two steps
It’s really important to learn to break down problems and translate them for
computers.
Biggest pitfalls
1. Treating code like an academic axercise
<…>
Language
<…>
High-level
Assembly language
Hardware
Machine Language
High Level Language
Interpreted
Compiled Language run the code through compiler and make it executable which
takes more time but runs faster
Interpreted Language This is Python, start from the code and run it
straightforward, there is no compiler. It runs everything up until an error.
General-purpose
Domain-specific Languages
HTML
SQL
General-purpose Languages This is Python
Object-oriented
Pycharm is an IDE
Keywords
Syntax
<…>
Specificity is important
Little mistakes can make a big difference
Abstraction is useful
Allows you to focus on the bigger picture, not on the little things.
If a computer isn’t doing what you want it to do – it’s because you told it to do
the wrong thing!
Breaking down the problem is much harder than writing the actual instructions
Lecture 2:
Float
- Decimal values
Integer
d
String
Holds text
Boolean
True/False Value
Examples:
True
False
Input()
Conditions
Comparisons
==
>
<
>==
Booleans
Lecture 4: Loops
d