ENGR 102 review

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/53

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

54 Terms

1
New cards

**

power/exponent

2
New cards

//

integer division - division without remainder

3
New cards

%

modulus - remainder from division

4
New cards

from math import*

allows us to use more math functions

5
New cards

sqrt(x)

square root

6
New cards

exp(x)

e^x

7
New cards

what do we have to take in consideration with trig functions? 

trig functions take in radian values not degrees

8
New cards

are integers a type of variable?

yes like 1 and -1

9
New cards

are floats a type of variable?

yes like 1.0 and - 2.0

10
New cards

ae Booleans a type of variable?

yes but only True and False

11
New cards

are strings a type of variable?

yes like “Howdy!”

12
New cards

how to convert value to integer

int(value)

13
New cards

how to convert to a float 

float(value)

14
New cards

how to convert to a string

str(value)

15
New cards

how to convert into a true Booleans

bool(value) except 0, 0.0, and empty

16
New cards

how to convert into a false Booleans

bool(value) but has to be 0, 0.0, and empty

17
New cards

==

equality

18
New cards

!=

inequality

19
New cards

<, <=

less than, less than or equal to

20
New cards

>,>=

greater than, greater than or equal to

21
New cards

what are the 3 Boolean operators

not, and, or

22
New cards

A and B

True if both A and B are True

23
New cards

A or B

True if either A or B are True

24
New cards

not A

reverse so if A is true it is false

25
New cards

conditional statements

if <condition>:

tab <do this>

26
New cards

when does the code indented inside happens 

if the condition is true 

27
New cards

if-else

use when there are 2 possibilities

28
New cards

if-elif-else

use when there are more than 2 alternative paths 

29
New cards

While loop

while <condition>:

tab <do this>

30
New cards

what does the while loop do

Repeats the indented code until the condition is False 

31
New cards

For loop

i = 0

for i in range <condition>:

tab <do this>

32
New cards

what does the for loop do?

Repeats the indented code a specific number of times whether the condition is true or false. 

33
New cards

why are comments necessary 

clarify your code, computation, and purpose 

34
New cards

Typical test cases

test for common possible errors within code 

35
New cards

edge or corner test cases

test special error cases that would be less common

36
New cards

loop keyword, break, does what

exits the loop

37
New cards

loop keyword, continue, does what

skips to next iteration

38
New cards

range(i, n, j) define each letter

i = starting value

n = stopping value

j = step “jump” value

39
New cards

how do get a certain rounding in an f-string

f”{variable:.#f}”)

40
New cards

len(list)

length of list

41
New cards

min(list)

minimum value in the list

42
New cards

max(list)

maximum in the list

43
New cards

sum(list)

sum of all variables in the list 

44
New cards

list.index(val)

finds the index of the first element in the list whose value matches val

45
New cards

list.count(val)

finds the number of occurrences of the val in the list 

46
New cards

list[start: end]

allows you to collect certain values in a list 

47
New cards

lists

<list name> = []

48
New cards
49
New cards
50
New cards
51
New cards
52
New cards
53
New cards
54
New cards