Unit 3 Sections 1-2 Blog
Unit 3 Sections 1-2
Notes
-A program’s abstraction that may store a value is known as a variable. Each variable has a corresponding data storage that holds a single value at a time, but that value may be a list or other collection, which in turn may hold numerous values.
-a variable is an abstraction inside a program that can hold a value
-All types of elements can be stored in lists.
-All list operations result in an error notice and program termination if a list index is less than 1 or more than the list length.
-assign stored values to a variable
-Data abstraction creates a barrier between a data type’s abstract properties and the specifics of its representation.
-elements:a single value in a list that has a special index. An index also makes references to elements.
-index:using natural integers when referring entries in a list
-One form of datum is more appropriate for representing some values than another.
-Some computer languages offer data types, which are referred to by variables, to represent data. Numbers, Booleans, lists, and strings are some of these types.
-The readability of program code and comprehension of the values that the variables represent are improved by using sensible variable names.
Vocab
abstract data types: a data type whose internal representation is hidden from the client
Applications programming interface (API): which is a list of constructors and instance methods or operations, used to specify the behavior of an abstract data type
client: a program that uses a data type
data types: a set of values and operations on those values
list: a sequence of several variables grouped together
objects: a structure that can take on a data-type value
variable: a way of storing information in a computer program, which could later be changed, referenced, and used
Section 1 Assignment 1
Answers 1 3 1 2 1 4
Questions I wrote
Determine the type of data that should be used to answer the following question:
What are the most popular sports? Answer: string
True or false, pickles are good? Answer:Boolean
How many pairs of shoes do you have? Answer: integer
Section 1 Assignment 2
Answers 3 2 4 2 2 3 1
Section 2 Assignment
Answers 4 1 3 4 4 2 3 2 6
Reflection
These lessons were a little difficult at first, but with persistence, I was able to grasp the ideas, which enabled me to correctly respond to the questions. I took a lot away from the presentation because it was amazing.