Hardware, Software Development & Algorithms Flashcards

1
Q

What is the purpose of a computer program?

A

tells computer the sequence of steps needed to complete a specific task

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

What does a computer program consist of?

A

vast number of primitive (simple) instructions

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

What is programming?

A

act of designing, implementing, and testing computer programs

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

Why can computers carry out so many tasks?

A

computers can execute DIFFERENT programs that are designed to specify tasks for the computer

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

What is hardware?

A

physical elements of a computer system

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

What are some examples of hardware?

A

monitor, mouse, external storage, keyboards (peripherals)

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

What is the CPU?

A

central processing unit;
- performs program control and data processing

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

What are storage devices?

A

memory (RAM) and secondary storage

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

What are examples of secondary storage?

A

magnetic drive: (hard disk drive HDD, or hard drive - HD, floppy disk, tape drive)
flashdrives (SD, MMC, jump drive, USB drive, SSHD)
optical drive (CD/DVD drives, blue ray drive)

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

What is the purpose of input/output devices?

A

allow user to interact with computer

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

What are some examples of input/output devices?

A

mouse, keyboard, printer, screen

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

What are the two parts of CPU?

A

control unit and arithmetic logic unit

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

What is the role of the control unit of the CPU?

A

DIRECTS OPERATION OF PROCESSOR
- manages all computer resources
- controls communication and coordination between input/output devices
- reads/interprets instructions
- determines the sequence for processing the data
- provides timing and control signals

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

What is the role of the arithmetic logic unit?

A
  • contains circuitry to perform calculations and make comparisons (does precisely what the control unit tells it to do - workhorse)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How can you make the CPU run faster?

A

increase cycle speed (Hz, MHz, GHz)

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

What are the two types of storage?

A
  • Primary/main
  • secondary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is primary storage?

A

composed of memory chips: electronic circuits that can store data as long as it has electric power

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

what is secondary storage?

A

external memory/storage provides a slower, less expensive storage that is persistent without electrical power

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

What are the two things computers store? What happens to them?

A

data and programs in secondary storage and loaded into memory when the program is executed

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

How is secondary storage different from primary storage?

A

not directly accessible by the CPU

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

What are some characteristics of secondary storage?

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

What occurrs prior to data being processed by CPU?

A

data is copied to primary storage

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

What is memory analogous to?

A

a table of cells all the same size containing a unique address beginning with 0

24
Q

How much does a typical computer’s main memory store?

A

4 to 32 GB

25
Q

How many bits in a byte?

A

8

26
Q

What are bits? How are they represented as bytes?

A

0 or 1
bytes are 8 0s or 1s in varying orders

27
Q

What is the purpose memory cell addresses?

A

uniquely identifies one cell in the computer’s main memory

28
Q

What are the memory cell addresses represented by?

A

numbers assigned consecutively starting at zero, creating a specific order of memory cells

29
Q

How large is a kilobyte?

A

1024 bytes (approx 1000)

30
Q

How large is a megabyte?

A

1048576 bytes (approx 1 million)

31
Q

How large is a gigabyte?

A

1073741824 (approx 1 billion)

32
Q

How are program instructions and data stored?

A

digital format

33
Q

What are the steps of executing a program?

A
  1. program instructions and data (text, number, audio, video) are stored in digital format
  2. when the program is started, it is brought to memory where CPU can read it
  3. CPU runs the program one instruction at a time and the program may react to user input
  4. instructions and user input guide the program execution
  5. CPU reads data, including user input, modifies it, and rites in Bach to memory, the screen or secondary storage
34
Q

What is software?

A

a sequence of instructions and decisions implemented in some language and translated to a form that can be executed or run on the computer

35
Q

What is an example of software?

A

typically an application program (OS, Word)

36
Q

How can computers perform complex tasks?

A

computers execute very basic instructions in rapid succession that are grouped to perform complex tasks

37
Q

What is an algorithm?

A

sequence of actions (detailed plan) to accomplish a given task (order mattering)

recipe

38
Q

What are the characteristics of an algorithm?

A

unambiguous
- no assumptions required to execute and precise instructions

executable
- can be carried out in practice

terminating
- algorithm will eventually come to an end or halt

39
Q

What is pseudocode?

A

half-way between a natural language and programming language
- informal description of a sequence of steps for solving a problem

40
Q

What do we need to start writing Python code?

A
  • hardware (desktop or laptop)
  • software (OS)
  • Python interpreter
  • Text editors and IDE
41
Q

What is IDE?

A

Integrated Development Environment
- code editor that helps by listing numbers of code, colour lines of code (comments and text) and auto-indent source code
- output window
- debugger

42
Q

What is the difference between IDE and interpreter?

A

python is interpreter and Vscode or PyCharm is IDE

43
Q

What does the Python program’s statements look like?

A

1st line is a comment (statement about the program for the programmers)

2nd line contains a statement that prints a line of text onscreen

my first Python program
Print (“Hello World!)

44
Q

What is the “Print” python syntax?

A

collection of programming instructions that carries out a particular task

print()

45
Q

How can you use/call a function in Python?

A
  1. specify the name of the function
  2. any values/arguments needed by the function to carry out its task
  3. arguments are in parentheses and multiple arguments are separated by commas
46
Q

What is a string?

A

a sequence of characters enclosed in quotation marks

47
Q

What are the two types of errors?

A
  1. compile-time (syntax) errors
  2. run-time (logic) errors
48
Q

What are syntax errors?

A
  • spelling capitalization, punctuation
  • ordering of statements, matching of parenthesis, quotes
  • no executable program is created by the compiler
49
Q

How can you fix syntax errors?

A

correct the 1st error listed and compile again. repeat until all errors are fixed

50
Q

What are logic errors?

A

program runs but produces UNINTENDED RESULTS and program may crash
- misspell or invalid expression

51
Q

Why was Python created?

A

to make it easier to learn and simplify other programming languages

52
Q

is python case-sensitive?

A

yes!

53
Q

How does python code?

A

python compiler translates source code into byte code instruction executed by the virtual machine

54
Q

what is a compile-time error?

A

violation of the programming language rules that is detected by the compiler

55
Q

what is a run time error?

A

causes a program to take an action that the programmer did not intend