cs midterm study

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/49

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:45 AM on 7/17/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

50 Terms

1
New cards

where is your program stored once it starts runnning?

main memory

2
New cards

what steps are involved in the execution cycle of an instruction

fetch-decode-execute

3
New cards

what is a machine language

binary used to perform basic operations

4
New cards

how are negative numbers stored in the memory

stored by using two’s complement: a coding technique used to store negative numbers

5
New cards

ASCII

coding scheme containing set of 128 numeric codes, used to represent characters to computer memory

6
New cards

largest number stored in a byte

255

7
New cards

what is a bit

smallest unit of digital data. represents a single 0 or 1

8
New cards

what is a byte

collection of 8 bits

9
New cards

what is hardware

physical, tangible machinery of a computer like a processor or screen

10
New cards

what is software

intangible set of digital instructions that tells the hardware what to do

11
New cards

syntax error

violation of languages structural and grammatical rules, preventing the code from running at all

12
New cards

logic error

code runs but produces an unintended output

13
New cards

multiplication

*

14
New cards

exponent

**

15
New cards

addition

+

16
New cards

subtraction

-

17
New cards

floating division

/

18
New cards

integer division

//

19
New cards

float

numbers contain decimal points

20
New cards

int

numbers without decimals

21
New cards

complex

numbers with a real and imaginary part

22
New cards

string

sequence of characters used as data

23
New cards

boolean

true or false

24
New cards

input()

reads a line of typed text by user, returning it as a string

25
New cards

print()

displays text, expressions, and numbers onto screen

26
New cards

or operator

one or both sub expressions must be true for the entire expression to be true

27
New cards

and operator

both sub expressions must be true for the compound expression to be true

28
New cards

not operator

used to invert truth value of a expression or variable

29
New cards

x>y

x>y

30
New cards

x<y

x<y

31
New cards

x>=y

x>_y

32
New cards

x<=y

x<_Y

33
New cards

x==y

x=y

34
New cards

x!=y

x does not equal y

35
New cards

for loop

automatically reads lines in a file and stops when end of file is reached

36
New cards

while loop

loop executes a block of code as long as a specified condition remains true

37
New cards

if statement

evaluates a condition and executes a block of code only if that condition is True

38
New cards

function header

first line of code in a function. includes keyword def and function name, followed by parentheses and colon

39
New cards

local variables

a variable declared inside a function body or as a function parameter

40
New cards

global variables

a variable declared outside of any function or class block, making it accessible throughout the entire module.

41
New cards

argument

data that is given to the function

42
New cards

parameters

variable that is assigned the value of an argument when the function is called. General format: def function_name(parameter):

43
New cards

value returning function

Executes the statements it contains, and then it returns a value back to the statement that called it

44
New cards

randint function

generates random number within range provided by argument and returns it to the program that called the function

45
New cards

randrange function

returns randomly selected integer from the resulting sequence

46
New cards

random function

returns a random float in the range of 0.0 and 1.0

47
New cards

uniform function

returns a random float but allows user to specify range

48
New cards

modes

string specifying how the file will be opened

49
New cards

how to open file

open file with ‘r’ mode

50
New cards

how to write on file

write method used to write data to the file. Format: file_variable.write(string)