Intro
- Represent a value with a variable
- Strings, lists, booleans, numbers
- Determine the value of a variable as a result of an assignment
Defining in Pythin
- To define a variable in python, just type in the variable name - one word - and use the = sign to set it equal to it's value.
- variable can be defined using numbers, string, list, or boolean
- Strings must have quotations around it
- lists must be surrounded by square brackets
boolean: T or F
- define dictionary w curly brackets
- create a new key and set it equal to a value
- can use floats ( a decimal)
- can do division, multiplication, print them
Javascript
- var name = value;
- can use algebra
- var x = x + y
- const also defines a variable
Boolean
- w = 6 and q = 5
- if w>6 boolean returns ture
Data Abstraction in Python
- Manages complexity in a program and makes code easier to implement
- differnt variables can hvae the same object
- can split and join lists and the data inside them