- Jan 2019
-
runestone.academy runestone.academy
-
phoneext.get("kent") >>> phoneext.get("kent","NO ENTRY")
? what happened here? we give the key kent the value no entry, or is this output?
-
Deletes the item in the ith position
? Different from pop(i) how? both delete? NOTE: read more about syntax elsewhere
-
Modifies a list to be sorted
? Like modifies to be sorted, like what does that mean? Sorts it? by what criteria?
-
(modulo) operator, %, and integer division, //
Modulo gives us the remainder of division only. Integer division gives us the quotient
-
Note that when two integers are divided, the result is a floating point.
note: check up what a floating point exactly means Googled : How floating-point numbers work The idea is to compose a number of two main parts:
A significand that contains the number’s digits. Negative significands represent negative numbers. An exponent that says where the decimal (or binary) point is placed relative to the beginning of the significand. Negative exponents represent numbers that are very small (i.e. close to zero).
-
-
runestone.academy runestone.academy
-
it is most easily reviewed by simply looking at and describing interactive sessions
?? What does this mean? interpreted sequentially vs compiled in one go?
-
-
runestone.academy runestone.academy
-
This is an example of procedural abstraction. We do not necessarily know how the square root is being calculated, but we know what the function is called and how to use it. If we perform the import correctly, we can assume that the function will provide us with the correct results.
So an abstraction allows the user or client to use communicate with and operate the program / machine without a knowledge of it's detailed workings; it is an interface that simplifies the operation of the machine / program. A procedural abstraction within a programming language, such as a an imported library or function in Python allows us to call and use a function such as 'math' without detailed knowledge of what it contains or the specific calculation steps involved.
-
Computer science is the study of problems, problem-solving, and the solutions that come out of the problem-solving process. Given a problem, a computer scientist’s goal is to develop an algorithm, a step-by-step list of instructions for solving any instance of the problem that might arise. Algorithms are finite processes that if followed will solve the problem. Algorithms are solutions.
Computer science is therefore a study of underlying patterns in problems and of developing methods to systematically solving problems
-