CSE 2050 - Mod 3

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

1/27

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:29 PM on 2/12/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

28 Terms

1
New cards

What is test-driven code?

Code that relies on tests to ensure its validity

2
New cards

What are the two main test modules?

Unittest and pytest

3
New cards

What is unittest?

A built in testing module that can be imported to test code

4
New cards

What is pytest?

A installable (not built-in) testing module

5
New cards

What is a vector?

A mathematical value that has magnitude and direction

6
New cards

What is running time?

How long it takes a code to run input.

7
New cards

As input bits increase, what happens to running time usually?

It increases

8
New cards

What is efficiency?

decreased running time with increased or maintained performance

9
New cards

What is adaptability?

The ability to change runtime to maintain efficiency from device to device

10
New cards

What determines the trend of growth in runing time?

Asymptomatic order of growth

11
New cards

What is asymptomatic notation?

the running time of an algorithm with a given input, n

12
New cards

What are the atomic operations?

Arithmetic and boolean operations, variable assignment, branching, calling a function, and returning a function

13
New cards

What is the red in Red-Green-Refactor process?

Red - write a test that fails before writing your code

14
New cards

What is the green in Red-Green-Refactor process?

Green - writing code that passes the test you wrote

15
New cards

What is the refactor in Red-Green-Refactor process?

Refactoring - checking the code for duplicates/finding where to condense

16
New cards

What line runs all the tests when using unittest?

unittest.main()

17
New cards

T/F You can’t begin method names with “test” in a unittest subclass

False, all of the methods must be named with “test” or they will not run

18
New cards

What is the parent class format used after importing unittest?

unittest.TestCase

19
New cards

What methods are used as testers?

assert(Equal, Value, etc)

20
New cards

What is the Big O?

A way to express running times as functions

21
New cards

Big O notation: Constant functions

O(1)

22
New cards

Big O notation: Log functions

Olog(n)

23
New cards

Big O notation: Linear functions

O(n)

24
New cards

Big O notation: nlog functions

O(nlogn)

25
New cards

Big O notation: Quadratic functions

O(n²)

26
New cards

Big O notation: Polynomial functions

O(nk) for a constant, k

27
New cards

Big O notation: Exponential functions

O(2n)

28
New cards

Big O notation: Factorial functions

O(n!)