CPSC 217

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

1/73

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.

74 Terms

1
New cards

computer

a device that receives, processes, and represents data

2
New cards

Moore's Law

-States that the complexity for a minimum component has increased at a rate of roughly a factor of 2 per

-year and although there is no reason to believe it will not remain nearly constant for at least 10 years

- Was not a law of nature, but just an observed path of exponential growth

- Held true until 2020, the complexity for minimum component loss doubles every year

3
New cards

computer science

study of computatio and computer technology, hardware, and software. diverse, problem solving interface

4
New cards

software engineering

- Was created by people

- How we develop large software projects

- How we model problems so that many people can work on it at one and ensuring software is working the way its suppose to

5
New cards

artificial intelligence

studies and develops intelligent machines and pieces of software

6
New cards

Difference Engine

→ Dates back to 1847-1849 by Charles Babbage

- The babbage difference engine was first completed in 1991 where a museum took his designs

and tweaked it until it worked

- Used to evaluate 7 degree polynomials to 31 decimal digits

7
New cards

ENIAC (Electronic Numerical Integrator and Computer)

completed in 1946. has about 17468 vacuum tubes

8
New cards

complexity theory

how efficiently can the problem be solved in terms of time and memory space

9
New cards

computability theory

Asking if a problem can be solved with a computer, some things are not (Ex. Halting problem)

10
New cards

top down design

start with the entire problem, break into 3-5 smaller problems, solve problems

11
New cards

algorithm

- A finite sequence of effective (unambiguous and possible to perform) steps that solve a problem

- Expressed in a human-readable form, which is flexible as long as your intended audience understands

it, and more is fine

- Does not have to be words, can be pictures

12
New cards

programming

translating algorithms into a computer language

13
New cards

programming language

allows users to control the behaviour of a computer

14
New cards

levels of abstraction

1. Human Languages → Are the most general and have the highest level of abstract

2. High Level Programming Languages (Ex. Python) are second highest

3. Low Level Programming Languages

4. Machine Language → Are the most specific and have the lowest level of abstract

15
New cards

comments

provide information to someone reading the code

16
New cards

syntax error

identified as code is loaded, no statement executed

17
New cards

runtime error

identified as the program runs, program does not complete successfully

18
New cards

logic error

program runs to completion but generates incorrect results

19
New cards

magic numbers

an unnamed and/or poorly documented numeric constant without obvious meaning

20
New cards

UTF-8

is another encoding scheme for characters, which is compatible with ASCII

21
New cards

ASCII (American Standard Code for Information Interchange)

a code for representing English characters as numbers, with each letter assigned a number from 0 to 127

22
New cards

Boolean logic

the basis for computation in modern computers

23
New cards

Blackbox testing

test program without looking at the source code, functional/behavioural

24
New cards

Whitebox testing

design test cases for the program by looking at its source code, structural

25
New cards

condition coverage

→ Every decision point in the program is executed

- Has a low level of certainty, and runs only once

26
New cards

statement coverage

every statement in the program is executed

27
New cards

path coverage

every possible path through the program is executed

28
New cards

while loops

allow a statement that only appear in the program once to execute several times, executes as long as (while) a condition executes to true

29
New cards

for loops

allow a statement that only appears in the program once to execute several times, executes once for each value in a collection

30
New cards

pre-tested loop

loop condition is tested before the loop executes the first time, runs 0 or more times

31
New cards

post-tested loop

any loop where the condition is not checked until the loop has executed once, runs 1 or more times

32
New cards

infinite loop

a loop that never terminates, this is typically a bug

33
New cards

initialization errors

forget to initialize a value, initialize a variable to the wrong place

34
New cards

termination error

→ Loop runs one times too many or one times too less

- Also known as “off by one error”

- Creates an infinite loop

35
New cards

off by one error

loop body runs one time too many or one time too few

36
New cards

tracing code

examine each statement in sequence, perform whatever tasks the statement requires, recording values of interest (usually requires that the value of each variable is recorded), result of this could be the value of one or more variables or the output generated

37
New cards

nested loops

the body of the loop can contain another loop

38
New cards

break

entire loop ends immediately, execution continues at the first statement after the body

39
New cards

continue

current iteration ends immediately, execution returns to the top of the loop

40
New cards

function

a named set of statements, perform some tasks, may require parameters, or may return values

41
New cards

parameter

allow us to provide data to a function, the name of the parameter variable in the function definition

42
New cards

argument

the value placed in brackets after the function name when the function

43
New cards

named argument

allow users to assign arguments to parameters in any order

44
New cards

global variables

defined outside the function, can be read anywhere in the program after it is assigned a value

45
New cards

scope

determines the portion of a program where a name can be used

46
New cards

preconditions

conditions that must be true before the function executes, if any precondition is not met, the function may not behave correctly

47
New cards

postcondition

Conditions that are guaranteed to be true after the function executes

- If the condition does not make the post-condition true then the function has a bug that needs to be fixed

- ‘Promises’ made by function

- What will be true after the function is called

48
New cards

list

a collection of values

49
New cards

selection sort

while there are still elements in the unsorted list, find the smallest element, remove it, append it to the sorted list

50
New cards

insertion sort

while there are still elements in the unsorted list, remove an element from the unsorted list, find the correct location for that element in the sorted list, insert the element at the correct location

51
New cards

bubble sort

  • keeps comparing and swapping numbers next to each other

  • It keeps doing it over and over again until everything is in the right numerical order

52
New cards

sorted method

takes an unsorted list, returns a new list sorted into increasing order

53
New cards

sort method

invoked on a list using dot notation, does not require any parameters, modifies the list, sorting it into ascending order

54
New cards

tuples

- When you want to return multiple things from a list

- Is similar to lists, but is more restrictive and cannot change

- Items cannot be assigned individually

- () → empty tuple

- (3,) → length one tuple

- aTuple = (1, “ICT”, 3.14)

55
New cards

dictionary

a collection of values, where each value in the dictionary has a unique identifier associated to it

56
New cards

mutable type

A compound data type whose elements can be assigned new values. (ie, list and dictionaries)

57
New cards

immutable type

A compound data type whose elements can NOT be assigned new values. (ie, float, int, boolean, string)

58
New cards

files

- Variables are temporary → the value is lost when program ends and/or if computer loses power

- Files provide a less volatile form of storage → values are retained after the program ends and are

retained when the computer loses power

59
New cards

text file

encoded using ASCII or Unicode, can be viewed with editors such as Emacs and Notepad, (ie. Python source files, web pages, .txt extension, .csv extension)

60
New cards

binary files

Contain arbitrary sequence of bits which do not perform to ASCII or Unicode characters (ie. images, word processor files, sounds, videos, powerpoint, programs (.exe))

61
New cards

sequential access

start at the beginning of the file (typically used for text files), read data from the file in the order that it occurs (may also be used for a binary file)

62
New cards

escape sequences

Provides a mechanism for placing that controls spacing inside a string

- Begins with a \ (backslash)

- Followed by one character describing the character that should be inserted

- Common escape sequence

63
New cards

command line arguments

values entered by a user when running a program from a command line

64
New cards

exceptions

are thrown when an error occurs, can be caught to recover from te error

65
New cards

database

a structured collection of records organized for ease of search and retrieval

66
New cards

primary key

a unique value associated with each row in a table, typically an integer

67
New cards

foreign key

a primary key value from another table residing in the current table

68
New cards

Recursion

When a function calls itself.

69
New cards

base case

does not make a recursive call, permits function to terminate

70
New cards

recursive case

function calls itself, generally must be a call to a small or simpler version of the problem

71
New cards

Fibonacci numbers

A pattern of numbers. It is found in galaxies, shells, flowers, humans, and other things.

72
New cards

Bloom’s Taxonomy

- Was created by Benjamin Bloom, who is an educator who studied how people think

- Identified 6 levels of competence

73
New cards

Blooms 6 levels of competence

- From least to most competence;

- Knowledge → Recalling something you have heard or read

- Comprehension → Inferring causes, and predicting consequences

- Application → Solving a problem by following a known or established pattern

- Analysis → Identifying bigger patterns, then separating a complex system into pieces, then

finding and identifying the relationship between those pieces

- Synthesis → Using old ideas to create new ideas, then combining several ideas to solve a

problem in a new and unique way (Also generalized from facts)

- Evaluation → Comparing multiple ideas, then identifying strengths and weaknesses of each

74
New cards

What are the Escape Sequences?

- \n → linefeed (newline)

- \t → tab (lining up columns)

- \” → double quotes (string with double questions)

- \\ → backslash