Chapter 1 Intro To Computers And Python 1.1-1.5 Flashcards

1
Q

Every year or 2, the capacities of computers have doubled inexpensively. This trend is called

A

Moore’s law

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

What units or sections can computers be divided into despite their physical appearance

6 answers

A

Input unit
Output unit
Memory unit
Arithmetic and Logic unit (ALU)
Centra processing unit (CPU)
Secondary storage unit

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

This “receiving” section obtains info from _______ devices and places it at the disposal of the other units for processing.

A

Input unit

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

This “shipping” section takes info the computer has processed and places it on various _______ devices to make it available for use outside the computer

A

Output unit

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

Information is commonly _____ to secondary storage devices such as SSDs, hard drives, etc

A

Output

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

Rapid-access, low capacity “warehouse” section retains info that has been entered through the input unit, making it immediately available for processing when needed.

A

Memory or random access memory (RAM)

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

Is the info on the ram retained after computer is shut off?

A

No, it’s volatile and is lost when computer is shut off. Usually has 12, 16 or 8GB. 1GB is one million bytes. A byte is eight bits. A bit is either a 0 or a 1

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

This “manufacturing” section performs calculations such as addition, subtraction, multiplication, and division. Plus the decision mechanism to compare 2 items from memory units to see if they’re equal.

A

ALU
Arithmetic and logic unit

It is part of the CPU

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

The “administrative” section coordinates and supervises the operation of the other sections.

A

Central processing unit
CPU

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

Having more than one processor

A

Multicore processors, can perform many operations simultaneously

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

Long-term, high capacity “warehouse” section.

A

Hard drive or secondary storage unit
Houses programs or data not actively being used by other units until they are needed in the future. Info is persistent and takes longer to access.
1 terabyte is one trillion bytes

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

Define

Data hierarchy

A

Data items processed by computers from a data hierarchy that becomes larger and more complex in structure. Processed from simplest to richer ones.

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

Short for binary digit

A

A bit

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

Can have the value of 0 or 1. The smallest data item in a computer.

A

A bit

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

Digits, letters and symbols are known as

A

Characters

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

Decimal digits are from what to what

A

0-9

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

Contains characters used to write programs and represents data items

A

Character sets

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

Character set used by Python that are composed of one, two, three or four bytes (8,16,24 or 32 bits, respectively) - known as** UTF-8 encoding**

A

Unicode

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

Subset of Unicode that represents letters, digits and some special characters

A

ASCII (American Standard Code for Information Interchange)

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

Composed of characters or bytes, not bits

A

Fields

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

Composed of several fields

A

Record

22
Q

Example of a record and payroll, include fields

A

Employee identification number (a whole number)
Name (string of characters)
Address (string of characters)
Hourly pay rate (number with a decimal)

Thus a record is a group of related fields

23
Q

A group of related records. Contains arbitrary formats.

A

File

24
Q

A group of related records viewed simply as a _________ in some operating systems

A

Sequence of bytes

25
Q

A collection of data organized for easy access and manipulation

A

Database

26
Q

Most popular model of database in which data is stored in simple tables.

A

Relational database

27
Q

Includes records and fields

A

A table. Example: table of students might include first name, last name, mayor, year.
The data for each student is a record. The individual pieces of info in each record are fields.

28
Q

3 general types of programming languages

A

* Machine languages
* Assembly languages
* High-level languages

29
Q

Name the language

Defined by its hardware design. Generally consists of strings and numbers that instruct a computer to perform elementary operations at a time

A

Machine language
They are machine dependent

30
Q

Language cumbersome to humans

A

Machine language
It has a lot of numbers. Ex: payroll program that adds overtime pay to base pay and stores the results in gross pay

+1300042774
+1400593419
+1200274027

31
Q

What is an assembly language?

A

The English-like abbreviations programmers started to use instead of using strings of numbers that computers could directly understand but was too slow and tedious for most programmers to use

32
Q

What are translator programs called that were developed to convert assembly-language programs to machine language at computer speeds?

A

Assemblers
Example:
Assembly-language payroll program also adds overtime pay to base pay and stores the result in gross pay

Load basepay
Add overpay
Store grosspay

Although such code is clearer to humans, it’s incomprehensible to computers until translated to machine language

33
Q

What is a high-level language?

A

A language developed in which single statements could be written to accomplish substantial tasks

34
Q

A typical high-level-language program contains many statements, known as the program’s _______ ________

A

Source code

35
Q

What are translator programs called that convert high-level-language source code into machine language?

A

Compilers

36
Q

__________ programs, developed to execute high-level language programs directly, avoid the delay of compilation, although they run slower than compiled programs

A

Interpreter programs

37
Q

Translator programs called _______ convert assembly-language programs to machine language at computer speeds

A

Assemblers

38
Q

____________ programs, developed to execute high-level-language programs directly, avoid the delay of compilation, although they run slower than compiled programs

A

Interpreter

39
Q

T/F High-level languages allow you to write instructions that look almost like everyday English and contain commonly used mathematical notations

A

True

40
Q

Performing a task in a program requires a ______ (it houses the program statements that perform its tasks, it essentially hides these statements from its users)

A

Method

41
Q

In Python, a program called a ____ houses the set of ____ that perform the ______ tasks

A

Class, methods, class’s
Example: a class represents a bank account, it might contain one method to deposit money to an account, another to withdraw money from an account and a third to inquire what the account’s balance is

42
Q

The process of building an object before a program can perform the tasks that the class’s methods define is called

A

Instantiation, an object is referred to as an instance of its class

43
Q

You can reuse a class many times to build many ____

A

Objects

44
Q

Why does the reuse of existing classes and components also help build more reliable and effective systems?

A

This is because existing classes and components often have undergone extensive testing, debugging and performance tuning. Reusable classes are crucial to the software revolution that has spurred by object technology

45
Q

What is it called when you send a message to an object for it to perform a task?

A

Method call, it tells a method of the object to perform its task
For example: a program might call a bank-account object’s deposit method to increase the account’s balance

46
Q

An object has ______ that it carries along as it’s used in a program. These _______ are specified as part of the object’s class. (same word for both blanks)

A

Attributes
Example: bank-account object knows the balance in the account it represents, but not the balance of other accounts in the bank.

47
Q

Attributes are specified by the class’s _________ _________

A

Instance variables
The class’s, its object attributes and methods are intimately related so classes wrap together their attributes and methods.

48
Q

A new class of objects can be created conveniently by _______ — the new class (called ______) starts with the characteristics of existing class (called the ______), possibly customizing them and adding unique characteristics of its own

A

Inheritance, subclass, superclass

49
Q

How to create the best solution to large complex projects? Step by step

A
  • Perform a detailed analysis process for dermining the projects requirements (what the system is supposed to do)
  • Then develop a design that satisfies them (specifying how the system should do it)
  • Review the design before writing any code (have your design reviewed by other software professionals)
50
Q

What is it called when the process of analyzing and designing your system from an object-oriented point of view?

A

Object-oriented analysis-and-design (OOAD) process
~~~

``` Languages like Python are like this and allow you to implement an object-oriented design as a working system

51
Q

The size, shape, color and weight of an object are _______ of the object’s class

A

Attributes

52
Q

T/F objects, or more precisely, the classes objects come from, are essentially reusable software components

A

True