OMIS 1050 WEEK 6

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/120

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.

121 Terms

1
New cards

What are some data point examples?

  • country

  • name

  • date

  • gender

  • time

2
New cards

What are data types’ use?

represent common data in code

3
New cards

What are commas’ use?

separate item

4
New cards

What comprises a bit?

1 / 0

5
New cards

What are bit numbers’ use?

represent value space & range

6
New cards

What is the short range?

-23,768 to 32,767

7
New cards

What is the int range?

-2 billion to 2 billion

8
New cards

What is the long range?

-(263) to 263

9
New cards

How many bits are in a byte?

8

10
New cards

What is the short minimum size?

  • 8 bits / 1 byte

11
New cards

What is the short minimum size?

  • 16 bites / 2 bytes

12
New cards

What is the usual int minimum size?

  • 16 bits / 2 bytes

  • 32 bits / 4 bytes

13
New cards

What is the usual minimum size?

  • 32 bits / 4 bytes

  • 64 bits / 8 bytes

14
New cards

What can represent decimals?

  • float

  • double

15
New cards

What is the float storage ability?

7 decimals

16
New cards

What is the double storage ability?

16 decimals

17
New cards

What is the float memory?

32 bits / 4 bytes

18
New cards

What is the double memory?

64 bits / 8 bytes

19
New cards

Why are float and double primitive?

  • core language requiring no special handling

20
New cards

What is precision?

decimal limit

21
New cards

What are float and double labelled as?

approximate

22
New cards

What is the problem with storing computer numbers?

binary convert

23
New cards

What is unsigned?

  • positive number variable

24
New cards

What is signed?

  • positive / negative number variable

25
New cards

What is the unsigned 16 bit short range?

0 to 65,535

26
New cards
27
New cards

What is the signed 16 bit short range?

-32,768 to 32,767

28
New cards

What is a Boolean data type’s use?

2 possible values representing logic & Boolean algebra

29
New cards

What statement types are associated with Boolean data?

conditional statement

30
New cards

What is a conditional statement’s use?

  • allow different action by changing control depending on true / false

31
New cards

How do you use Boolean in Python?

<variable name>=true

32
New cards

What does the char data type store?

letter / number / symbol string

33
New cards

How do you define a character in C++?

char {variable name} = ‘{char value}’

34
New cards

What are data structures’ use?

  • connect / group data

  • access data

35
New cards

What is a string?

  • character sequence

36
New cards

What is the string’s first character position?

0

37
New cards

How do you define a string in JavaScript?

var word = “Home”

38
New cards

How do you define a string in Python?

word = ‘<text>’
OR
word = “<text>”

39
New cards

What is an array?

ordered value collection

40
New cards

What are the array characteristics?

  • ordered / fixed length

  • homogenous

41
New cards

What is an element?

individual array value

42
New cards

What is length?

element number

43
New cards

What is the index?

position number

44
New cards

True or False: Elements must have data to be numbered elements.

False

45
New cards

How do you define an array in Python?

<array name> = [<element list>]

46
New cards

How do you return an element in Python?

<array name>[<index>]

47
New cards

What is control flow?

function call & instruction & statement order

48
New cards

What is a control flow statement’s use?

  • determine code section to run

49
New cards

How do you use conditional logic in Python?

<variable name> = <input>

if <variable name> <equality sign> <conditional input>:

print(“<text>”)

else:

print(“<text 2>”)

50
New cards

How do you use a counter in Python?

range(<start value>,<end value>)
for <variable name> in range(<start value>,<end value>):
  print(f"<text> {<variable name>}") 

51
New cards

What Python function generates up to but not including the end value?

=range()

52
New cards

What is a multidimensional array?

  • array associating element with >1 index

53
New cards

What is the common multidimensional array?

2D array

54
New cards

What are some 2D array synonyms?

  • table

  • matrix

55
New cards

What is a linked list?

connected node series

56
New cards

What comprises a node?

  • data

  • next node pointer

57
New cards

What is the linked list head?

1st node & pointer

58
New cards

What does the last linked list node point to?

null

59
New cards

How do you get a linked list item?

  • follow pointer from head to next node

60
New cards

What is a linked list advantage?

  • don’t have to be stored in sequence

61
New cards

What is a linked list disadvantage?

  • can take long to grab item in sequence

W

62
New cards

What is a stack?

data structure

  • LIFO

63
New cards

What are the 3 basic stack operations?

  • push

  • pop

  • peek

64
New cards

What is a push?

  • insert data on stack

65
New cards

What is a pop?

  • remove top data from stack

66
New cards

What is a peek?

  • read top data without removing from stack

67
New cards

What function checks if the stack is empty?

IsEmpty

68
New cards

What function checks if the stack is full?

IsFull

69
New cards

What is a stack example?

  • browser back button

70
New cards

What is a queue?

data structure

  • FIFO

71
New cards

What is an enqueue?

  • put item in queue

72
New cards

What is a dequeue?

  • remove item from queue

73
New cards

What are some queue examples?

  • call centre

  • CPU & disk schedule

  • printer

74
New cards

What is a tree?

  • abstract hierarchy model

75
New cards

What comprises a tree?

  • parent-child nodes

76
New cards

What are some linear data structures?

  • array

  • linked list

  • stack

  • queue

77
New cards

What is a linear data structure?

sequential data structure

78
New cards

What is a tree advantage?

non-linear

  • easy access

79
New cards

What are some tree terminology?

  • root

  • edge

  • external & internal node

  • node ancestor & descendant

  • node depth & height

80
New cards

What is a root?

  • node without parent

81
New cards

What is an edge?

  • node link

82
New cards

What is an internal node?

  • node with 1+ child

83
New cards

What is an external node?

  • node with no child

84
New cards

What are some node ancestor examples?

  • parent

  • grandparent

  • great-grandparent

85
New cards

What is node depth?

ancestor number

  • root - node edge number

86
New cards

What is node height?

max node depth

87
New cards

What are some node descendant examples?

  • child

  • grandchild

  • great-grandchild

88
New cards

What does BST stand for?

Binary Search Tree

89
New cards

What is a BST?

tree

  • internal node has 2+ children

  • children = ordered pair

OR

  • single node

90
New cards

What are internal node children’s names?

  • left child

  • right child

91
New cards

What are some BST uses?

  • math

  • decision

  • search

92
New cards

What is the BST left child & parent & right child relationship?

left child < parent < right child

93
New cards

What is a decision tree?

decision binary tree

94
New cards

What is in an internal decision tree node?

  • question

95
New cards

What is in an external decision tree node?

  • answer

96
New cards

What are some tree examples?

  • file

  • database index

  • expression parse

  • routing algorithm

97
New cards

What is a graph data structure?

node collection connected to other nodes

98
New cards

What is a graph data structure example?

  • Facebook

99
New cards

What is some graph data structure terminology?

  • adjacency

  • path

  • directed graph

100
New cards

What is adjacency?

  • edge connecting vertices