Engineering Programming [COMBINED SET]

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

1/343

encourage image

There's no tags or description

Looks like no tags are added yet.

344 Terms

1
New cards

$

Reference a specific cell only (does not reference cell relative to it)

2
New cards

IF Statement

=IF(logical_test, [value_if_true], [value_if_false])


3
New cards

Nested IF Statement

Used for more complicated criteria (e.g. assigning different grade % a letter mark)

4
New cards

Counts number of cells within range that meet a condition

=COUNTIF(range, criteria)


5
New cards

Counts number of cells in range

=COUNTA(value)


6
New cards

Adds cells within a range that meet a condition

=SUMIF(range, criteria, sum_range) 


7
New cards

Calculates average of cells within a range that meet a condition

=AVERAGEIF(range, criteria, sum_range)


8
New cards

Returns value in same row for a specific value

=VLOOKUP(lookup_value, table_array, col_index_num, range_lookup)


9
New cards

Returns value in same column for a specific value

=HLOOKUP(lookup_value, table_array, row_index_num, range_lookup)


10
New cards

Returns value based on value of another cell

=SWITCH(value to switch, value_1, return_1, value_2, return_2, ...)


11
New cards

Finds exact or approx value

Range_lookup = TRUE/1 in V/HLOOKUP

12
New cards

Finds only exact value

Range_lookup = FALSE/0 in V/HLOOKUP

13
New cards

Typesetting

Typing symbols and numbers in exact notation in excel

14
New cards

\

Goes before name of symbol to typeset

15
New cards

Generate integer within range

=RANDBETWEEN(lower, upper)


16
New cards

Freeze Panes

Keep certain rows/columns visible at all times (have to select row/column no. + 1)

17
New cards

Conditional Formatting

Styles cells in a certain way (i.e. colour, font, font weight) based on certain conditions

18
New cards

Returns nth largest value in set

=LARGE(array, n)


19
New cards

Integer

Numeric data type without fractions (e.g. 300, 0, -4)

20
New cards

Float

Numeric data type with fractions (e.g. 34.67, 56.9)

21
New cards

Character

Single letter, digit, punctuation, symbol, or blank space (e.g. a, 1, !)

22
New cards

Boolean

True or false values, true = 1, false = 0

23
New cards

Primitive Data Type

Smallest units of data, atomic

24
New cards

Composite Data Type

Built around primitive data types

25
New cards

String

Sequence of characters, digits, or symbols (text)

26
New cards

Array

List of a number of elements of the same type in a specific order

27
New cards

List

Collection of elements of the same or different type

28
New cards

Less memory usage, better for large numeric datasets

Benefits of array over a list

29
New cards

Pointers

Blocks of memory that are dynamically allocated are managed/stored

30
New cards

Tuple

An ordered collection used to store multiple items in a single variable

31
New cards

Dictionary

A list with assigned key:value pairs

32
New cards

Image Data

Every pixel localised with 2 coordinates. For RGB, pixels have values for red, green and blue channels.

33
New cards

Multispectural Images

3-10+ channels, produces data cube

34
New cards

Variable

A name location in memory

35
New cards

Variable Requirements

Starts with character/underscore, only contains alphanumeric characters or underscore, caps sensitive

36
New cards

Operands

Parts of an equation that operations are performed on (e.g. for 10 × 2 = 20, 10 and 2 are operands)

37
New cards

%, modular

Operator that finds remainder in division

38
New cards

//, floor

Operator that divides and rounds down

39
New cards

**

Exponential

40
New cards

==

Comparison of two sides of equation that returns a Boolean

41
New cards

!=

Inequality operator (opposite of ==)

42
New cards

>=

Greater than or equal to

43
New cards

<=

Less than or equal to

44
New cards

*=

Returns output back to variable

45
New cards

Casting

Turning an element of a certain type into a different type (if possible)

46
New cards

int()

Turns float/string into integer

47
New cards

float()

Turns int/string into float

48
New cards

str()

Turns int/float into string

49
New cards

Parameter

Required input into function that makes function work, in brackets after function

50
New cards

Argument

User input of function that is assigned to a parameter

51
New cards

Keyword Arguments

Argument is directly assigned to parameter (e.g. id=”a1234567”), order does not matter

52
New cards

Positional Arguments

Argument assigned to parameter by order of writing (e.g. “a1234567”)

53
New cards


*args

Packs multiple positional arguments into a tuple

54
New cards

**kwargs

Packs multiple keyword arguments into a dictionary

55
New cards

and

Joins two conditions, conjunction (both must be true for a resulting true value)

56
New cards

or

Disjunction, only one of two conditions must be true for a resulting true value

57
New cards

not

Inverse of condition(s)

58
New cards

Return Value

Function provides a value (i.e. computes it)

59
New cards

Void Function

Function without a return value

60
New cards

Header

Non-indented part of a function/block of code

61
New cards

Body

Indented part of a function/block of code

62
New cards

if/else function

if [condition]:
	[action]
else:
	[action]


63
New cards

if/elif/else function

if [condition]:
	[action]
elif [condition]:
	[action]
else:
	[action]


64
New cards

Gives type of item

type([item])


65
New cards

Assigns user input to variable

variable = input("[question]")


66
New cards

String

Type that user input returns

67
New cards

List

numbers = [1, 2, 3]


68
New cards

Array

numbers = np.array([1, 2, 3])


69
New cards

Place terms in order

list.sort()


70
New cards

Prints term in list

print(list[x])


71
New cards

Set value of term

list[x] = ...


72
New cards

Gives length of list

len(list)


73
New cards

Adds term at end of list

list.append([term])


74
New cards

Replaces value of term

list.insert([term], [replacing value])


75
New cards

Removes last term

list.pop()


76
New cards

Removes specific term

list.pop([term])


77
New cards

Clears list

list.clear()


78
New cards

Slices list

list[start:end:step]


79
New cards

Iteration

for [variable] in [list]:
	[action]


80
New cards

Iterator object

iter()


81
New cards

Gives numbers in range

range(start, stop, step)


82
New cards

Performs action for numbers in range

for i in range(start, stop, step):
	[action]


83
New cards

for loop

Executes a block of code for each element

84
New cards

while loop

Continuation of block of code until a certain criteria is met

85
New cards

Continues action for given condition

while [condition]:
	[action]


86
New cards

Terminates loop

break


87
New cards

Defines function

def function():
	[function]


88
New cards

Defines function with parameter

def function([parameter]):
	[function]


89
New cards

Generators integer between limits

random.randint([lower], [upper])


90
New cards

Import all functions from package

from [package] import *


91
New cards

Import specific function from package

from [package] import [function]


92
New cards

Import function with shorthand

import [package] as [shorthand]


93
New cards

Checks for type of argument

isinstance([variable], [type])


94
New cards

Shows error message

raise Value Error


95
New cards

Catches exception

try:
	[action]
except:
	[action]


96
New cards

Rounds to 2 decimal places

number:.2f


97
New cards

Rounds to 4 decimal places

number:.4f


98
New cards

User Friendly

Try/except error user friendliness

99
New cards

Not User Friendly

Raise error user friendliness

100
New cards

end=’ ‘

kwarg for print function that makes printing all on one line (rather than starting a new line each print instance)