Week 1 - Ch 1 & 2 Flashcards

1
Q

A program (aka a(n) __) is like a __ that tells the computer ‘what’s next’.

A

algorithm
recipe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Fundamentally, computers are
__/__ machines.

A

encoding/decoding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Everything that a computer represents (text, images, sounds, etc.) is an encoding of what?

A

Ones and zeros

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Encoding schemes can be layered atop what?

A

encoding schemes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Who is Guido van Rossum?

A

Python inventor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which is not a major implementation of Python?
A. CPython
B. Javathon
C. IronPython
D. Jython

A

B. Javathon

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which implementation of Python is the “classic” Python?

A

CPython

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which implementation of Python is best for utilization in the Microsoft .NET Framework (Common Language Runtime, CLR, virtual machines)?

A

IronPython

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which implementation of Python is best for Java Virtual Machines (JVM)?

A

Jython

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

T or F: Python includes its own IDE whereas R does not making Python a better choice.

Explain why or why not.

A

False. R includes IDE, not Python. But Python is still better because R can’t utilize other languages (like Python).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Why is Python better than SAS in informatics (2 reasons)?

A

SAS is excellent for business but not very good for science. SAS is also very expensive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why is Python better than SQL in informatics (3 reasons)?

A
  1. SQL is not a ‘full’ language
  2. SQL doesn’t handle non-structured data well
  3. R and Python can use SQL well, but SQL can’t use R or Python.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which of the following is NOT a strength of Python?
1.Flexible
2. Dynamic
3. Utilizes other languages (although modules must be developed in-house).
4. Wide availability of software modules (prewritten, extensively tested, and free software)
5. New modules addressing new domains are continually being developed.
6. Works with a variety of third-party software libraries.

A
  1. Utilizes other languages (although modules must be developed in-house).

Python easily uses other languages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Python supports multiple programing paradigms, meaning it is:
1. __: Data-centric approach using step-wise sequential processing promotes centralized architectures.
2. __: scope of data is elegantly managed (Based on Alonzo Church’s Lambda Calculus).
3. __: Focuses on the direct transformation of program state.
4. __: Uses encapsulation of data and methods to support extensible and reusable code.

A

Procedural

Functional

Imperative

Object-oriented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Guido van Rossum created Python in 1989 as an improvement upon this language.

A

ABC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the one bad thing about Python?

A

Version 3.x and above are not backward compatible with 2.x and below.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What’s the simplest way of working with Python?

A

command line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

A popular IDE is IDLE; what does IDLE stand for?

A

Eric Idle (of Monty Python).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

An IDE is a step up from command line. What’s a step up from IDE (such as IDLE)?

A

IPython

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Which Python development environment makes programming in Python much easier?

A

IPython (which we are supposedly using).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

__ and __ are the two major IPython IDEs.

A

Canopy
Anaconda

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

__ boasts having a community that provides a variety of strong, academic resources (which is why we are using it).

A

Canopy (?????)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

__ is a IPython-like facility that supports multiple languages.

A

Jupyter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

One of the coolest and most powerful features of IPython is the IPython __.
It can be used as a way of capturing IPython programming sessions in a special format that can be saved and exchanged with colleagues.

A

Notebook

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

IPython Notebooks are __-based (displayed and executed within a standard browser).

Python Notebooks are also __ meaning colleagues can see and edit your IPython session with their own code, and can be executed in their browser.

A

HTML

dynamic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

The spirit of what is alive with IPython Notebooks?

A

The Internet!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

There are 2 major Canopy panes in a notebook: an upper and lower. What do each show?

A

The upper is the view pane used to create the notebook, built cell-by-cell.

The lower is an interactive command line pane that enables interaction with Python outside of the notebook.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Each IPython code cell consists of what 2 things?

A

Input and output element pairs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What 2 entry modes exist in IPython cells?

A

Code or Markdown

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Expressions are created by specifying one or more operations to be __ or __.
When an expression is evaluated, we say that it resolves to a __.

A

performed;
evaluated

value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Variables are named __ that hold values that may vary

A

receptacles

32
Q

The analogy of a __ is an excellent visualization of a program variable.

A

box

33
Q

What are 2 important aspects to any given data type?

A

Its size and its encoding scheme.

34
Q

An __ __ describes how the bits in memory will be interpreted based on that data type.

A

Encoding Scheme

35
Q

Whereas size deals with the implementation details of how much space is need to manage the data, the __ __ deals with the semantics (meaning) of the data residing in that space

A

encoding scheme

36
Q

A __ is a sequence of characters.

A

string

37
Q

A line with threaded beads is analogous to?

A

a string data type

38
Q

What is meant by a mixed expression?

A

An expression of two data types, such as division by an integer of a float.

39
Q

A data type that supports a larger range of values and/or more precise values is said to be __.

A

wider

40
Q

What really happens when you concatenate two strings?

A

A new string is created (rather than two strings added or glued together.

41
Q

In Python, __ are used with String literals to denote what is called an __ sequence.
List what the following do:
1) \t
2) \r
3) \n

A

backslashes;
escape

  1. tab
  2. carriage return
  3. new line
42
Q

Backslashes can be used to delimit a file path, but forward slashes are preferred. Explain 2 reasons.

A

Backslashes must be duplicated to indicate the file path and not be mistaken for an escape sequence.

Forward slashes are platform independent.

43
Q

We can name variables, methods, classes, modules, packages, and programs—each one of these serves as an __. __ help us manage complexity.

“Naming is __.”

A

abstraction

Abstractions

abstraction

44
Q

__-__ language: A programming language like Python that is designed to be easy for humans to read and write.

A

high-level

45
Q

__ mode: A way of using the Python interpreter by typing commands and expressions at the prompt.

A

interactive

46
Q

__: To execute a program in a high-level language by translating it one line at a time.

A

interpret

47
Q

__-__ language A programming language that is designed to be easy for a computer to execute; also called “machine code” or “assembly language”.

A

low-level

48
Q

__ __: The lowest-level language for software, which is the language that is directly executed by the central processing unit (CPU).

A

machine code

49
Q

__ __: Stores programs and data. __ __ loses its information when the power is turned off.

A

main memory

main memory

50
Q

__: To examine a program and analyze the syntactic structure.

A

parse

51
Q

__: A property of a program that can run on more than one kind of computer.

A

portability

52
Q

__ function: An instruction that causes the Python interpreter to display a value on the screen.

A

print

53
Q

__ __: The process of formulating a problem, finding a solution, and expressing the solution.

A

problem solving

54
Q

__: A set of instructions that specifies a computation.

A

program

55
Q

__: When a program displays a message and pauses for the user to type some input to the program.

A

prompt

56
Q

__ __: Stores programs and data and retains its information even when the power is turned off. Generally slower than __ __. Examples include disk drives and flash memory in USB sticks.

A

secondary memory

main memory

57
Q

__: The meaning of a program.

A

semantics

58
Q

__ error: An error in a program that makes it do something other than what the programmer intended.

A

semantic

59
Q

__ __: A program that’s in a high-level language.

A

source code

60
Q

__: A statement that assigns a value to a variable.

A

assignment

61
Q

__: To join two operands end to end.

A

concatenate

62
Q

__: Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program.

A

comment

63
Q

__: To simplify an expression by performing the operations in order to yield a single value.

A

evaluate

64
Q

__: A combination of variables, operators, and values that represents a
single result value.

A

expression

65
Q

__ __: A type that represents numbers with fractional parts.

A

floating point

66
Q

__: A reserved word that is used by the compiler to parse a program; you
cannot use __ like ‘if’, ‘def’, and ‘while’ as variable names.

A

keyword

keywords

67
Q

__: A memory aid. We often give variables __ names to help us remember what is stored in the variable.

A

mnemonic

mnemonic

68
Q

__ operator: An operator, denoted with a percent sign (%), that works on integers and yields the remainder when one number is divided by another.

A

modulus operator

69
Q

__: One of the values on which an operator operates.

A

operand

70
Q

__: A special symbol that represents a simple computation like addition, multiplication, or string concatenation.

A

operator

71
Q

__ of __: The set of rules governing the order in which expressions involving multiple operators and operands are evaluated.

A

rules of precedence

72
Q

__: A section of code that represents a command or action. So far, the __ we have seen are assignments and print.

A

statement

statements

73
Q

__: A type that represents sequences of characters.

A

string

74
Q

__: A category of values. The __ we have seen so far are integers (type int), floating-point numbers (type float), and strings (type str).

A

type

types

75
Q

__: One of the basic units of data, like a number or string, that a program manipulates.

A

value

76
Q

__: A name that refers to a value.

A

variable