Introduction To Python Flashcards

(45 cards)

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
Indentation error
The line of code are improperly indented.
26
Value error
An invalid value is used. Can occur when giving letters to int().
27
Name error
Occurs when trying to use a variable that doesn't exist.
28
Type error
An operation uses incorrect types, such as an integer being added to a string.
29
IDE
Stands for integrated development environment. Refers to various editor programs that support various languages.
30
Processors
Circuits that execute a list of calculations, each called an instruction.
31
Memory
A circuit that stores 0s and 1s in thousands of addressed locations.
32
Machine instructions
Instructions represented as 0s and 1s. This is what the computer uses to execute commands.
33
Executable program
A sequence of machine instructions.
34
Assembly language
Translated from 0s and 1s by assemblers to make it more legible for humans. Translates high level language into low level machine instructions
35
High-level languages
Even closer to how humans think than assembly.
36
Compilers
Programs that automatically translate high-level language programs into executables.
37
Storage
Anything that can store binary values. Disks (hard drives) are the most common. They are non-volatile, maintaining their content even powered off.
38
RAM (Random Access Memory)
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
Clock
Determines the rate instructions are executed at. 1MHz for cheap processors and 1GHz for costlier ones.
40
Transistors
Smaller switches.
41
Integrated circuits
A single chip that carries transistors. By 2012, ICs can carry several billion transistors.
42
Moore's Law
Roughly every 18 months, the capacity of ICs will double.
43
Microprocessor
A single IC processor.
44
Operating system
Manages programs and interfaces with peripherals.
45
Is Python 3.0 backwards compatible?
No.