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
Q

whitespace

A

any space, tab, or newline

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

input()

A

allows user to input values, causes interpreter to wait for input before continuing

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

string

A

sequence of character
‘Hello’ is ‘H’ ‘e’ ‘l’ ‘l’ ‘o’

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

type

A

determines how a value can behave (ex: string, integers)

29
Q

int()

A

can convert string to integer

30
Q

input prompt

A

add string into input function to give user prompt before they input data

31
Q

syntax error

A

violates programming rules on how symbols can be combined

ex: putting multiple print() on one line

32
Q

runtime error

A

program attempts impossible operation, like divide by 0

33
Q

crash

A

abrupt and unintended termination of a program

34
Q

indentation error

A

lines of a program aren’t properly indented

35
Q

value error

A

invalid values used
ex: letters in int()

36
Q

name error

A

program tries to use variable that doesn’t exist

37
Q

type error

A

operation uses incorrect types

ex: adding integer to a string

38
Q

logic error

A

program loads correctly but doesn’t behave as expected (aka bug)

39
Q

switch

A

controls whether or not electricity flows

40
Q

1

A

positive, electricity flows

41
Q

0

A

zero, prevents flow of electricity

42
Q

bits

A

0s and 1s that build connections

43
Q

processors

A

circuits created to execute list of desired calculations

44
Q

instruction

A

list of desired calculations

45
Q

memory

A

circuit that can store 1s and 0s

46
Q

machine instructions

A

instructions in bits (1s and 0s)

47
Q

executable program

A

sequence of machine instructions together

48
Q

assembly language instructions

A

machine learning instructions translated to human readable form

49
Q

assemblers

A

translate machine learning instructions to assemble language instructions

50
Q

high-level languages

A

support programming w/ formulas or algorithms

51
Q

compilers

A

programs that translate high level languages into executable program

52
Q

input/output devices

A

screens display output and keyboards allow user to input data

53
Q

storage

A

disk/hard drive stores files and other data

54
Q

memory

A

RAM (random access memory) temporarily holds and reads data from storage, RAM us more costly per bit but runs faster

55
Q

bytes

A

8 bit segments

56
Q

proessor

A

runs computer program by reading and executing instructions from memory (aka CPUs)

57
Q

operating system

A

allows user to run other programs and interfaces with many peripherals

58
Q

cache

A

memory accessible in one clock tick, processor chip with small amount of RAM

59
Q

clock

A

in processor, ticks at specific frequency to govern rate of processor’s executions

60
Q

integrated circuit (IC)

A

smaller switches, also known as transistors

61
Q

moore’s law

A

doubling of IC capacity every 18 months

62
Q

scripting languages

A

executes program without need for compilation

63
Q

script

A

program whose instructions are executed by interpreter

64
Q

advantages of script

A

avoids compilation step, you can run the same script on different processors

64
Q

backward compatible

A

older versions run on newer ones, python is NOT backward compatible

65
Q

python

A

scripted language created by Van Rossum in late 1980s

65
Q

disadvantage of scripts

A

slower and requires multiple interpreter instructions

66
Q

open source

A

user community participates in defining a language and creating new interpreters

67
Q

precision

A

small details like correct spelling, case, and whitespace