2 Flashcards

1
Q

comp 2.1: what is decomposition

A

breaking the problem down into smaller parts to simplify it, the smaller problems can be called sub-problems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

comp 2.1: what is a structure diagram

A

they are used to represent decomposition, they are divided into nodes, the smallest node contains one task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

comp 2.1: what is algorithmic thinking

A

this is a way of finding a solution by finding the individual steps needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

comp 2.1: what is abstraction

A

where you remove the unnecessary details from a problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

comp 2.1: what is a linear search

A

this searches through a dataset and matches the first letter and then the next and the next until it finds a match

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

comp 2.1: what is a binary search

A

finds a midpoint in the data sees if what you want is higher or lower and then half again until it finds a match, only works in an ordered list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

comp 2.1: what is a bubble sort

A

a bubble sort is a sort that orders a list by letting the things floaty to the top

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

comp: what is a logic error

A

it is an error in which an unexpected output occurs, they do not stop the program from working

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

comp: what is a trace table

A

it is a method of checking a program that involves going through it and recording each change in a new column of the table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

comp 2.4: how do transistors function

A

by using semicondctors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

comp 2.4: what component in the computer uses transistors to temporarily store data

A

the RAM (primary storage)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

comp 2.4: what are electrically controlled switches called

A

transistors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

comp 2.4: what are logic circuits composed of, where are they in the computer and what do they do

A

transistors, CPU and they perform calculations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

comp 2.4: what form logic gates or “switches”

A

transistors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

comp 2.4: how many transistors are in the CPU

A

3 bn

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

comp 2.4: true or false, logic gates selectively allow electrisity to flow

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

comp 2.4: what do logic gates form in the CPU

A

logic circuits that perform calculations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

comp 2.4: do you perform the operations in brackets first in Boolean order of operations

A

yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Comp 2.4: what is this symbol in Boolean logic ^

A

It is AND

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Comp 2.4: what is this symbol in Boolean logic ¬

A

NOT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Comp 2.4: what is this symbol is Boolean logic V

A

It is OR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

comp 2.4: what is the order of precedence for Boolean logic

A

Not, And, Or

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

comp 2.5: what is a HLL

A

it is a high level language and often resembles English, they can be very portable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

comp 2.5: what are the pros and cons of HLLs

A

pro: they often resemble English
con: they are not always as fast as they require more translation

25
comp 2.5: what is an LLL
it is a low level language, they require less translation (lowe levels of abstraction from machine language)
26
comp 2.5: what are compilers
they translate a whole code at once, errors do not stop the code from being compiled and will all show up when the compiling is done, they create an exicutable file
27
comp 2.5: what is an interpreter
they translate high level code into executable programs one line at a time, they stop when they find and error
28
comp 2.5: what is an assembler
they translate assembly code into binary, they run fast.
29
comp 2.5: what is an IDE
Integrated development environments, they are software that facilitate software development
30
comp 2.5: in terms of IDEs what are debug tools
error diagnostics that highlight errors in code
31
comp 2.5: in terms of IDEs what are code editors
they allow code to be written
32
comp 2.5: in terms of IDEs what are translators
a program that converts source code into object code they also facilitate the 'RUN' button
33
comp 2.5: what are the pros and cons of LLL
pros: faster, they need less translation cons: they are hard to read
34
comp 2.5: what are the pros and cons of Compilers
pros: - they provide a list of errors and aren't stopped by a single one - this can make debugging easier - they produce an executable program that can help to protect copyright cons: - they can be very slow
35
comp 2.5: what are the pros and cons of Assemblers
pro: - they only work on assembly language - they provide direct control over the hardware con: - they are very difficult to use
36
comp 2.5: what are 3 features of IDEs
debug tools, code editors, translators
37
comp 2.5: what are 3 types of translators
compilers, interpreters, assemblers
38
comp 2.2: in python, how do you find the length of a string
len(var)
39
comp 2.2: in python, how do you return a string in upper case
var = "hi" var.upper() print(var)
40
comp 2.2: in python, how to transform a string into lower case
var.lower()
41
comp 2.2: in python, how do you return the 5th character of a string
print(var[4])
42
comp 2.2: in python, how do you print characters 1 to 5 of a variable
var = "hello world" print(var[0**:**4]) output is hello
43
comp 2.2: in python, what is the code that allows you to open write to, append data(add a new file) and read a file
f = open("myfile.txt", "w") f.write("hi") f = open("myfile.txt", "a") f.write("hi") f = open("myfile.txt", "r") print(f.read()) f.close
44
comp 2.2: what do you have to do after opening a file in python
close it (f.close)
45
comp 2.2: what is does the SELECT function sql do
the field (column) of the text that you are selecting
46
comp 2.2: what does the FROM function in sql do
it defines the table you are selecting from
47
comp 2.2: what does the WHERE function do in sql
it defines the conditions that must be met for the data to be returned
48
comp 2.2: what does the ORDER BY function do in sql
it orders the returned data in an order, either asc(ascending) desc(descending) order
49
comp 2.2: what does the AND function do in SQL
it adds a condition that must be met for the data to be returned
50
comp 2.2: what does WHERE LIKE "A%"
return anything where the first letter is A% can be followed by anything.
51
comp 2.2: what is casting
it is the process of change one form of data into another
52
comp 2.2: how do you do a single line comment in python
#
53
comp 2.2: how do you do a multi line comment in python
""" comment """
54
comp 2.1: how is the dataset divided in a binary search
by using integer division which is dividing without including a fractional part 8/ 3 = 2 not 2.6666
55
comp python: how do you write a number to the power of another
num1 ** num2
56
comp python: how do you figure out if a number is even or odd
if number % 2 == 0 then its even
57
comp: what is a zero indexed array
the first item is an index of zero
58
comp 2.2: how d you do integer division in python
//