CSE Exam 1 Study Guide

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

1/36

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:07 AM on 9/24/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

37 Terms

1
New cards

input() Rule

Whatever the use types (even numbers) will be captured as a string

2
New cards

Int()

Converts strings into integers (Ex. “20” becomes 20)

3
New cards

Float()

keeps the decimal

4
New cards

What happens when you you run int(“3.85”)?

The decimal will be dropped completely, does not round

5
New cards

What does print() do automatically?

Adds a newline character at the end

6
New cards

What does \” and \’ do?

Adds quotes inside print statement, or statement that already has quotes

7
New cards

is _score = 10 legal or illegal?

legal

8
New cards

is this legal or illegal? 1_place = 2

illegal

9
New cards

What is a single =?

assignment operator

10
New cards

What is a double =?

true/false statement

11
New cards

What is the execution rule?

Calculates RIGHT side first and stores it to the variable on the LEFT

12
New cards

What returns floats?

/, math.sqrt, math.pow

13
New cards

What returns integers (no decimal)?

floor, modulo, math.ceil, math.floor

14
New cards

Order of operations

Parentheses, exponents, multiplication, addition

15
New cards

what is x += 5

x = x + 5

16
New cards

What is x *= 2

x = x * 2

17
New cards

What is x %= 4

x = x % 4

18
New cards

What does random.randint include?

Both start and stop

19
New cards

what does random.randrange include?

Start but not stop

20
New cards

What is random()

float between 0 and 1

21
New cards

What is random.uniform?

Gives decimal values between the ranges

22
New cards

What two math symbols do strings work with?

+(join) and *(repeat)

23
New cards

What does print(len(“hello!”)) do?

output: 6 (counts amount of characters)

24
New cards

What does print (python[0]) do?

output: p (prints the first character of the word)

25
New cards

What do you need to be aware of when using math.sqrt and math.pow?

They always return floats, even if the result is a whole number

26
New cards

What is a explicit conversation?

Manually using int(), float(), or str()

27
New cards

Syntax Error

Violates python grammar rules before running

28
New cards

Runtime error

occurs while the program is running (Ex. dividing by 0)

29
New cards

indentation error

lines arent being properly indented

30
New cards

value error

invalid value is used (ex. using letters in int())

31
New cards

name error

trying to use a variable that does not exist

32
New cards

type error

When performing an operation on a data type that doesn’t support it (Ex. 5 + “apples”)

33
New cards

Logic errors

program runs properly but the output is incorrect due to human error

34
New cards

math.ceil

rounds UP to nearest integer

35
New cards

math.floor

rounds down is nearest integer

36
New cards

math.pow

puts x to the power of y (x,y) (ex. (2, 3) = 8)

37
New cards

math.fabs

absolute value