Language of a Computer and Python Flashcards

1
Q

Computer programs (software) are not designed specifically for each task.

A

False.

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

A software is created with a compiler.

A

False. Programming languages.

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

Every computer understands its own language directly.

A

True.

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

A binary digit (bit) can be 0 or 100.

A

False. 0 or 1.

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

It is the smallest unit of data that a computer can process and store.

A

Bit.

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

A byte is a sequence of…

A

8 bits.

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

How many bytes in 100,000 bits?

A

12,500 bytes.

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

Python instructions (source code) need to be translated into a _ _ using an _.

A

machine language, interpreter

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

They are programs that translates a program in a high level language into the equivalent machine language.

A

Compiler/interpreter.

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

What are the 2 programming methodologies?

A
  1. Object oriented programming
  2. Procedural programming
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Structured design _ a problem into _ problems then _ the bigger problem by _ all _.

A

divides, smaller, solves, combining, solutions

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

In an object oriented design (OOD), a program is…

A

a connection of interacting objects.

An OOD also includes variables and functions.

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

An object consists of…

A

data and operations.

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

What are the 3 steps in OOD?

A
  1. Identify objects
  2. Form solutions
  3. Determine how objects interact
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Python is a _ purpose, dynamic, and _ programming language.

A

general, interpreted

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

Python does not support OOD (to develop apps) and structured design.

A

False.

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

Python provides lots of high level data structures.

A

True.

18
Q

He is the founder of Python.

A

Guido van Rossum.

He released it on February 20, 1991.

19
Q

Previous versions of a programming language can still be used.

A

False.

20
Q

It is the predeccesor of Python.

A

ABC.

21
Q

What are features of Python?

There are 12.

A
  1. Easy to use
  2. Expressive
  3. Interpreted language
  4. Cross platform language (portable language)
  5. Free and open source
  6. OOD language
  7. Extensible
  8. Large standard library
  9. GUI programming support
  10. Integrated
  11. Embeddable
  12. Dynamic memory allocation
22
Q

A cross-platform/portable language can be used in…

A

different OS.

23
Q

Since Python is extensible, it can be…

A

compiled using other languages.

Converts program into bytecode.

24
Q

Since Python has dynamic memory allocation, specifying the data type is still needed.

A

False.

25
Q

What are some applications of Python?

A
  1. Web
  2. Desktop
  3. GUI
  4. Software development
  5. Scientific and numeric
  6. Business
  7. CAD
  8. Image processing
26
Q

How does an interpreter work?

A
  1. Write the program using a text editor
  2. Turn into source file
  3. Go through interpreter to be compiled, transformed into byte code (.pyc), and go into virtual machine
  4. Translate into ML
  5. Execute code line by line
27
Q

What differentiates an interpreter from a compiler?

A

An interpreter executes line by line, but a compiler has to read the entire source code first before executing.

28
Q

What are the 3 problem solving processes?

A
  1. Analyse the problem
  2. Implement the algorithm
  3. Maintain the program
29
Q

It is a program methodology represented by functions or modules.

A

Structured design.

30
Q

It is the focus of structured design.

A

Top-down decomposition, and control/data flow.

31
Q

What are the 4 central characteristics of OOD?

A
  1. Encapsulation
  2. Inheritance
  3. Polymorphism
  4. Abstraction
32
Q

To run a Python program, Python instructions need to be translated into an…

A

intermediate language called bytecode.

33
Q

To run a Python program, the _ is _ into a particular machine language.

A

bytecode, interpreted

34
Q

In Python, the machine language is called…

A

bytecode.

35
Q

What is a Python Virtual Machine?

A

A hypothetical computer developed to make Java programs machine independent.

36
Q

In structured design, the broken down components are often represented as…

A

functions or modules.

37
Q

What are the 3 common techniques in structured design?

A
  1. Data flow diagrams
  2. Warnier-Orr diagrams
  3. Structure charts
38
Q

The OOD approach.

A

It views a system as a collection of objects, each with its own data (attributes) and behaviours (methods).

39
Q

OOD focuses on these 4 central characteristics.

A
  1. Encapsulation
  2. Inheritance
  3. Abstraction
  4. Polymorphism
40
Q

3 common techniques in OOD.

A
  1. Class diagrams
  2. Unified Modeling Language
  3. Design patterns
41
Q

Differentiate structured design from OOD.

A
  1. Structured design emphasizes the functional decomposition of a system, focusing on how data flows through it.
  2. OOD focuses on modeling real-world entities and their interactions within a system, emphasizing data encapsulation and object-oriented principles.
42
Q

Modern software projects never use structured design and OOD in tandem.

A

False.