Introduction To Python Flashcards

1
Q

Input

A

A program receives data from a file, keyboard, touchscreen, etc.

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

Process

A

A program performs computations on that data.

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

Output

A

A program puts that data somewhere, such as a file, screen, or network.

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

What does a program consist of?

A

A list of instructions performed one at a time. Basic instructions are input, process and output.

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

Variables

A

Names that link to values stored in memory.

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

Computational thinking

A

Creating a sequence of instructions to solve a problem.

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

Algorithm

A

A sequence of instructions.

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

Interpreter

A

A program that interprets a script without compiling it before hand. Executing the script as it reads through.

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

Interactive interpreter

A

A program that allows users to execute one line of code at a time.

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

Code

A

Term for the text representation of a program.

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

Line

A

A row of text

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

Prompt

A

The ‘»>’. Indicates the interpreter is ready to accept code.

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

Statement

A

A program instruction.

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

Expression

A

Codes that return a value when evaluated. (x + y). Cannot have the = operator.

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

Assignment

A

Code where a variable receives a value.

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

Print()

A

Displays variables or expression values or string literals. Starts a new line.

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

Comments

A

Text that doesn’t affect the program. Begins with a hashtag (#).

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

\n

A

Forces a line break. (A new line)
Named the newline character. Can work even in a string literals.

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

Whitespace characters

A

Space, tab and newline

20
Q

Input()

A

A function that takes text from the user. Default type is string, but can be changed by placing input in the functions int(), float(), etc.

21
Q

Input prompt

A

Can be done by writing text in input(). Prints the string in between the parentheses where the user will type their text.

22
Q

Syntax error

A

A violation of a programming language’s rules on how code is written.

23
Q

Good coding practice

A

Run the code frequently to verify whether you’ve made errors to prevent having to search through your entire script.

24
Q

Runtime error

A

The syntax is correct, but the program attempts an impossible operation.

25
Q

Indentation error

A

The line of code are improperly indented.

26
Q

Value error

A

An invalid value is used. Can occur when giving letters to int().

27
Q

Name error

A

Occurs when trying to use a variable that doesn’t exist.

28
Q

Type error

A

An operation uses incorrect types, such as an integer being added to a string.

29
Q

IDE

A

Stands for integrated development environment. Refers to various editor programs that support various languages.

30
Q

Processors

A

Circuits that execute a list of calculations, each called an instruction.

31
Q

Memory

A

A circuit that stores 0s and 1s in thousands of addressed locations.

32
Q

Machine instructions

A

Instructions represented as 0s and 1s. This is what the computer uses to execute commands.

33
Q

Executable program

A

A sequence of machine instructions.

34
Q

Assembly language

A

Translated from 0s and 1s by assemblers to make it more legible for humans. Translates high level language into low level machine instructions

35
Q

High-level languages

A

Even closer to how humans think than assembly.

36
Q

Compilers

A

Programs that automatically translate high-level language programs into executables.

37
Q

Storage

A

Anything that can store binary values. Disks (hard drives) are the most common. They are non-volatile, maintaining their content even powered off.

38
Q

RAM (Random Access Memory)

A

Volatile. Temporarily holds data read from storage. Faster than disks. ‘Random Access’ refers to it accessing any location quickly and arbitrarily. Usually located off the processor chip

39
Q

Clock

A

Determines the rate instructions are executed at. 1MHz for cheap processors and 1GHz for costlier ones.

40
Q

Transistors

A

Smaller switches.

41
Q

Integrated circuits

A

A single chip that carries transistors. By 2012, ICs can carry several billion transistors.

42
Q

Moore’s Law

A

Roughly every 18 months, the capacity of ICs will double.

43
Q

Microprocessor

A

A single IC processor.

44
Q

Operating system

A

Manages programs and interfaces with peripherals.

45
Q

Is Python 3.0 backwards compatible?

A

No.