Computing Science and Programming Flashcards

0
Q

What are five steps to problem solving?

A
  1. Identify the problem
  2. Possible solutions l
  3. Analyze and select a solution
  4. Execute the solution
  5. Determine if the solution has fix the problem
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

What is three aspects of computation?

A
  1. Design and analysis of algorithm
  2. Formalization of algorithm as programs
  3. Development of computational device for executing programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the most important skill for a computer scientist?

A

Problem solving

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

Define problem solving

A

The ability to formulate a problem, think of creative solutions and express solutions as clearly and as accurately as possible.

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

Define algorithm

A

An algorithm is a finite sequenced set of unambiguous steps that once executed, produces a result

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

Define program language

A

Is a language that allows us to specify detailed instructions that a computer can understand and execute

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

What does computing mean?

A

Field of studying computer

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

Define decomposition in computer science

A

To decompose is to break down into “finer” details. Ex. Decomposing a vague solution into a more detailed and descriptive solution

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

Define programming/software development

A

The science and art of creating computer programs for the purpose of solving problems

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

Order the following instructions in chronological order
• Input Data
• structure data and represent it in a solution
• Output - identify data produced by solution

A
  1. Input Data
  2. Output - identify data produced by solution
  3. Structure data and represent it in a solution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the five ways to express an algorithm?

A
  1. Using a natural language like English
  2. Pseudocode
  3. Flow chart
  4. Video
  5. Diagram (pictures)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is input?

A

Receive data from keyboard, mouse, file, network or etc

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

What is output? Or examples of it

A

Display data on screen, save it in the file, etc

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

What is an example of a high level language?

A

Python

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

What are alternative names for low level languages?

A

Machine language or assembly language

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

Computers can only execute programs written in which languages? High- level or low-level languages?

A

Computers can only run programs written in low-level languages (machine language)

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

Define machine language

A

Encoding of instructions in binary so that they can be directly executed by the computer

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

What is the one disadvantage of high-level language?

A

It takes time to process before executing

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

What are four advantages of using high-level languages?

A
  • less time to write it
  • shorter and easier to read it
  • portable, which means it can be used on different computers with few to no modifications
  • more likely to be correct
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are the two programs or softwares that changes high-level languages into low-level languages?

A

Interpreters and compilers

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

What is the difference between compiler and interpreter?

A

Interpreter process bits and bits of high-level language while executing it.

Compilers process the whole high-level language before executing it.

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

Define source code

A

Source code is the program (high-level language) before it is processed/translated and contains instructions

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

Define object code

A

A program that has been processed or translated

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

Define executable

A

Object code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Define byte code
Object code
25
What is a virtual machine?
A program that interprets low-level languages
26
Fun fact: after a program is interpret, the language is called interpret language
🍔
27
What are two ways to use Python IDLE?
Python interpreter Shell mode and Python program editor
28
What is the advantage of Python interpreter?
One gets immediate feedback
29
Fun fact: In shell mode,
It express Python expression into Python shell
30
What does >>> mean and what is it called
Python prompt >>> It indicates that the interpreter is ready for instructions
31
Fun facts: files that contain Python programs
End with .py
32
Define pseudocode
The use of natural language and computer language together
33
Define computer programming
Finite sequenced set of computer programming language instructions
34
What are two things programming language is made out of?
Vocabulary (building block) And Syntax rules (grammar)
35
What is programming language also called?
Formal language
36
What is the first generation of programming language?
Machine language
37
What is the second generation of programming language?
Assembly languages
38
What is the third generation of programming language?
High-level language
39
What is the fourth generation of programming language?
4GL
40
Which of the following is CPU dependent? 1. Machine language 2. High-level language 3. Assembly language
1 and 3 | Machine language and assembly language
41
Define mnemonic
Label
42
Define error-prone
High chance of making a mistake
43
What is the advantage to machine language?
The algorithm is already translated therefore it can be executed
44
What are the disadvantage of assembly language and machine language?
Both are error-prone and tedious to read
45
What is three differences between assembly languages and machine languages?
1. Assembly language must be translated to machine language before execution. 2. Assembly language express the instructions in a series of zeroes and ones like machine language but assembly language also load, store and halt. (Mnemonic) 3. Assembly language is easier to read than machine language
46
Define debug
Finding problems within programs or algorithms and fixing it
47
How abstract is assembly language from machine language? 1 or 2 level away?
Assembly language is 1 level of abstraction away form machine language.
48
True or false? High-level languages are abstract
True
49
Object code is written in __________ _____________.
Object code is written in only machine language
50
Define Scratch
Scratch is a block-based imperative, event-driven, dynamically-type and interpreted programming language.
51
What are two things Syntax rule contain?
Token and structure
52
Define token
Token are elements of languages. Examples are words, numbers and chemistry elements
53
Define parsing
Analyzing structure
54
What are the three differences between natural language and formal language?
1. Natural languages are ambiguous while formal language is unambiguous (clear) 2. Natural language has a lot of redundancy (more words than necessary) while formal language is brief and concise 3. Natural language are full of idiom and metaphors while formal language means exactly what they say
55
Define prose
Literal meaning of words
56
Fun fact: natural language is like poetry while formal language is like prose
📖
57
Which is more dense and harder to read? Formal language or natural language?
Formal language
58
Fun fact: interactive mode
Is the same thing as interpreter mode
59
Define script mode
A way of using the Python interpreter to read code from a script and run it
60
What is the difference between script mode and interactive mode?
Script mode doesn't automatically display results where as interactive mode gives immediate feedback.
61
What are 4 steps of the execution flow?
1. State problem 2. Design algorithm+identify data 3. Turn algorithm into program 4. Test it
62
Define print statement
An instruction that causes the Python interpreter to display a value on the screen
63
Define bug
Error in program
64
Define Python
Python is a text-based, interpreted, object-oriented, dynamically-type, high-level programming language
65
Define script
A program stored in a file