Unit 3 lesson 1-2 Notes
x = 5
y = "Ananya"
print(x)
print(y)
x = 5
y = 6
z = 5 + 6
print(z)
number = 20.3
x = number/10
y = number*2
print(number)
print(x)
print(y)
print(x*y)
Key Points
- A list is made up of elements organized in a specific order
- An element is a unique, individual value in a list
- A string differs from a list as it is a sequence of characters rather than elements
- Data abstraction uses a list by taking specific data elements from a list and organizing into a whole, less complex - - representation of the values such as a table
- Python
- JavaScript
What is data abstraction?
- Data abstraction provides a separation between the abstract properties of a data type and the concrete details of its representation
- data abstractions manage complexity in programs by giving a collection of data a name without refrencing the specific elements of the representation
- Data Abstraction makes it easier to implement, develop and maintain code
thislist = ["dog", "cat", "cows", "pig"]
print(thislist)
thislist = ["apple", "banana", "cherry"]
print(thislist[1:2])