Module 2 video notes Flashcards
Script
A sequence of instructions to tell computers what to do
- Made of one or more statements
Statement
A syntactic unit of a programming language that expresses some action to be carried out
- Think ‘sentences’ or ‘paragraphs’ of writing artifact
What are variables?
- It is a reference to a place in the computer’s memory where some values are stored (temporarily)
- Computers have extremely ‘short’ memory because memory is expensive
- Only store limited amount of data (1’s and 0’s)
What do we do with variables?
Calculate some arithmetic operations: addition (+), subtraction (-), multiplication (*), division (/), etc
What about letters, sounds, pictures?
1’s and 0’s can be transformed into other symbolic expressions
What are diff data types?
Numbers
- Integers (1, 2, 3,….)
- Boolean: 1(True), 0(False)
- Float: numbers with decimals
Strings
- Texts - a sequence of values that represent Unicode code points (think of alphabet)
What are operators?
Symbols that perform the following:
- Addition
- Subtraction
- Multiplication
- Division
- And more…
How to work with text in Python. What do computers only recognize?
Computers only recognize 1’s and 0’s
Computers use alphabet – a set of letters that come in packages, usually in order sequences
We can assign numbers to each letter. Ex: A: 65, a: 97
What are the common encoding or set of codes?
Unicode, ASCII
These were developed originally with typewriter in mind
Elaborate
Special characters in Python have special meaning in Python
- Quotes – single, double, triple (Indicates a string)
- Hashtags (comment)
- Use escape character to escape its alternate use (' single quote and "” double quote)
How do conditional statements - IF provide multiple pathways to decision?
IF – creates conditions
What are conditions in IF statements?
Condition: compares something to be true or false
- If true, do something
- Else (if false), do something else
Why descriptive statistics?
To Summarize Data
- Mean/Median/Mode (all of these names mean the same thing really)
- SD, Var, Range (Min, Max), (these all really mean the same thing too)
- Sum
- Count
What are Python statements and scripts?
They are used to instruct computers to execute mathematical operations
What are variables used for?
They store data into computer’s memory so that you can use/reuse it later