week 1- intro to python Flashcards

1
Q

incremental development

A

writing, compiling, and testing code in small amounts

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

program specifications

A

output statements and submit for grading after each step

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

program

A

instructions executing one at a time

input -> process -> output

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

input

A

program gets data from file, keyboard, touchscreen, etc

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

process

A

program preforms computations on that data

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

output

A

program puts data somewhere

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

variables

A

used to refer to data, like x

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

computational thinking

A

creating sequence of instructions to solve a problem

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

algorithm

A

sequence of instructions that solves a problem

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

python interpreter

A

computer program that executed code written in python coding language

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

code

A

textual representation of a program

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

line

A

row of code

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

interactive interpreter

A

program that allows code to execute one line at a time

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

prompt («<)

A

indicates interpreter is ready to accept code

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

statement

A

program instruction, on its own line

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

expression

A

code that returns value when evaluated (ex: x*y)

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

assignment

A

= sign, used to create new variable

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

print()

A

displays variables or expression values

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

comments #

A

notes written by programmer

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

string literals

A

letters, numbers, spaces, and symbols in quotes “ “

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

newline

A

ourput after every print(), each use of print() should start on a new line

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

keeping output on same line

A

add end = ‘ ‘ inside of print function for lines to be separated by single space

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

commas

A

used to separate different items in output

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

newline character /n

A

output can move to next line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
whitespace
any space, tab, or newline
26
input()
allows user to input values, causes interpreter to wait for input before continuing
27
string
sequence of character 'Hello' is 'H' 'e' 'l' 'l' 'o'
28
type
determines how a value can behave (ex: string, integers)
29
int()
can convert string to integer
30
input prompt
add string into input function to give user prompt before they input data
31
syntax error
violates programming rules on how symbols can be combined ex: putting multiple print() on one line
32
runtime error
program attempts impossible operation, like divide by 0
33
crash
abrupt and unintended termination of a program
34
indentation error
lines of a program aren't properly indented
35
value error
invalid values used ex: letters in int()
36
name error
program tries to use variable that doesn't exist
37
type error
operation uses incorrect types ex: adding integer to a string
38
logic error
program loads correctly but doesn't behave as expected (aka bug)
39
switch
controls whether or not electricity flows
40
1
positive, electricity flows
41
0
zero, prevents flow of electricity
42
bits
0s and 1s that build connections
43
processors
circuits created to execute list of desired calculations
44
instruction
list of desired calculations
45
memory
circuit that can store 1s and 0s
46
machine instructions
instructions in bits (1s and 0s)
47
executable program
sequence of machine instructions together
48
assembly language instructions
machine learning instructions translated to human readable form
49
assemblers
translate machine learning instructions to assemble language instructions
50
high-level languages
support programming w/ formulas or algorithms
51
compilers
programs that translate high level languages into executable program
52
input/output devices
screens display output and keyboards allow user to input data
53
storage
disk/hard drive stores files and other data
54
memory
RAM (random access memory) temporarily holds and reads data from storage, RAM us more costly per bit but runs faster
55
bytes
8 bit segments
56
proessor
runs computer program by reading and executing instructions from memory (aka CPUs)
57
operating system
allows user to run other programs and interfaces with many peripherals
58
cache
memory accessible in one clock tick, processor chip with small amount of RAM
59
clock
in processor, ticks at specific frequency to govern rate of processor's executions
60
integrated circuit (IC)
smaller switches, also known as transistors
61
moore's law
doubling of IC capacity every 18 months
62
scripting languages
executes program without need for compilation
63
script
program whose instructions are executed by interpreter
64
advantages of script
avoids compilation step, you can run the same script on different processors
64
backward compatible
older versions run on newer ones, python is NOT backward compatible
65
python
scripted language created by Van Rossum in late 1980s
65
disadvantage of scripts
slower and requires multiple interpreter instructions
66
open source
user community participates in defining a language and creating new interpreters
67
precision
small details like correct spelling, case, and whitespace