Computer Programming Exam 1 Review

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/82

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:07 PM on 9/19/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

83 Terms

1
New cards

Computer Programming

detailed, step by step set of instructions telling a computer exactly what to do

2
New cards

Software

programs

3
New cards

Hardware

the physical machine

4
New cards

Anaylsis

process of examining algorithms and problems mathematically

5
New cards

CPU only accesses information stored where?

main memory (RAM or random access memory)

6
New cards

What type of memory does not hold storage when it loses power

Main Memory

7
New cards

Humans & Computers interaction through what?

input/output devices

8
New cards

Examples of input/output devices

keyboard, mouse, microphone, etc.

9
New cards

Operating Software

suite of software that controls the various hardware resources of a computer

10
New cards

Examples of operating software

Windows, mac OS, Linux

11
New cards

Bootstrap Loader

small program that is initially loaded into RAM when the computer is first turned on or restarted

12
New cards

Syntax

programming languages ‘precise form’ / grammar

13
New cards

Semantics

it’s precise meaning

14
New cards

Compiler

complex computer program that takes another program written in high level language and translates it into an equivalent program in the machine language of the same computer

15
New cards

Source Code

the high-level program

16
New cards

Interpreter

program that stimulates a computer that understands high level language

17
New cards

High level languages are more…

portable

18
New cards

What are needed every time in interpreting

the interpreter and the source code

19
New cards

Advantages of interpreters

more flexible programming and can be run interactively

20
New cards

Compiling is…

one shot translation

21
New cards

Advantages of compiling

can be run over and over again without repeated need for a compiler or source code, it’s also faster

22
New cards

print()

prints a blank line

23
New cards

fn+f5 automatically….

runs a function

24
New cards

What are the parts of the process of writing code?

Analyze the problem, determine specifications, create a design, implement the design, test/debug, and maintain

25
New cards

Analyze the problem

What are we trying to solve?

26
New cards

Determine the specifications

What will our program accomplish?

27
New cards

Create a design

Figure out the overall design of your program

28
New cards

Implement the design

Turn the design into computer language

29
New cards

Test/Debug

Find errors and fix them

30
New cards

Maintain

develop for the needs of your user

31
New cards

Names

must begin with “_” or a letter, no spaces, case sensitive, cannot use python keywords

32
New cards

Examples of python keywords

False, True, await, else, is, or, not, etc.

33
New cards

Expressions

fragments of code that produce or calculate new data values

34
New cards

Literal expressions

used to indicate a specific value

35
New cards

String Expressions

a sequence of printable characters (“ “)

36
New cards

Evaluation

turning an expression into an underlying data type

37
New cards

Operators

+, -, * , /, //, **, %

38
New cards

Concatenation

adding strings together

39
New cards

/n

new line

40
New cards

Evaluate an identifier numerically

eval()

41
New cards

commas

add spaces

42
New cards

Functions

objects that take inputs and return outputs

43
New cards

functions have…

parameters

44
New cards

end = “ “

Will end code on the same line

45
New cards

Assigning a literal to an identifier is as easy as…

setting the two equal

46
New cards

%

Modules. The remainder left over, ex. 5%2 = 1

47
New cards

//

Integer division. ex. 5//2 = 2

48
New cards

type()

tells you whether something is an int, a float, or a string

49
New cards

int

tells the reader that the value cannot be a fraction

50
New cards

float type

can only represent approximations to real numbers, includes decimals

51
New cards

operations on floats produce…

floats

52
New cards

operations on ints produce…

ints

53
New cards

int()..

truncates

54
New cards

round(x, y)

x = number, y= number of decimal points rounded to, it can be negative

55
New cards

Computer stores floats in…

binary

56
New cards

typecast

converting int, float, and str into int, float, or str

57
New cards

Object oriented

a sort of active data type that combines both data and operations

58
New cards

AKA Objects…

know stuff and do stuff

59
New cards

Opening a graphics window

win = GraphWin(“x”,y,z) where x = name of the window, and y and z are the size

60
New cards

win.close()

closes the window

61
New cards

GraphWin is by default what size?

200 × 200 pixels

62
New cards

__.draw(win)

draws the object

63
New cards

Class

describes the properties the instance (object) will have

64
New cards

Constructor

an expression that creates a brand new object

65
New cards

Methods

the set of messages that an object responds to

66
New cards

Accessor Methods

allows you to get information from the instance variables

67
New cards

Examples of accessor methods

p.getX(), p.getY()

68
New cards

Mutator Methods

methods that change the state of an object

69
New cards

Example of mutator methods

move()

70
New cards

Aliasing

when two different variables refer to exactly the same object and changes that are made to one variable also occur on the others

71
New cards

duplicates an object

_.clone()

72
New cards

set coordinates

win.setCoods( , , , )

73
New cards

Initially, (0,0) is where

Top left hand corner

74
New cards

API

Applications Programming Interface

75
New cards

what does autoflush=False do?

turns off automatic updating of a window

76
New cards

What question does computer science answer?

What can be computed?

77
New cards

Real-world chaotic behavior example

butterfly effect - computer models used to simulate and predict weather patterns are so sensitive that the effect of a single butterfly flapping its wing may make a difference

78
New cards

Location (address)

a string of numbers and letters, the place in a computer memory where this function’s definition is stored

79
New cards

Difference between high-level computing language and a low level one

high level is more portable

80
New cards

IPO

input, process, output

81
New cards

Garbage collection in python

Python automatically takes values that are no longer referred to by any variable and clears them out of the memory, opening space for new values

82
New cards

Accumulator

an accumulator is an algorithmic pattern that keeps track of the running total while doing repeated calculations

83
New cards

How does python deal with large integers

A python integer is not a fixed size and expands to accommodate the value it holds and as an integer value gets bigger, Python automatically converts to a representation using more bits