Python Pearson Essentials Chapter. 1
What is the difference between a compiler and an interpreter?
A compiler is a program that translates a high-level language program into a separate machine language program. The machine language program can then be executed any time it is needed. An interpreter, which is a program that both translates and executes the instructions in a high-level language program. The interpreter reads each individual instruction in the program, it converts it to machine language instructions then immediately executes them.
14. A set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters is _________. - binary numbering - ASCII - Unicode - ENIAC
ASCII
20. In the part of the fetch-decode-execute cycle, the CPU determines which operation it should perform. - fetch - decode - execute - deconstruct
Decode
5. The computer stores a program while the program is running, as well as the data that the program is working with, in . - secondary storage - the CPU - main memory - the microprocessor
Main Memory
18. The tiny dots of color that digital images are composed are called _______. - bits - bytes - color packets - pixels
Pixels
Review Question(s) 1. A(n) is a set of instructions that a computer follows to perform a task. - compiler - program - interpreter - programming language
Program
A program has to be copied into what type of memory each time the CPU executes it?
RAM
What part of the computer collects data from people and from other devices?
input device
When programming in _________ mode, the interpreter waits for you to type a Python statement on the keyboard and then executes it.
interactive
What would you call a device that works with binary data?
A digital device is any device that works with binary data (Gaddis, 2010 Chap. 1).
13. A bit that is turned off represents the following value: . 1 −1 - 0 - "no"
0
ASCII is an encoding scheme that uses a set of __________ to store characters in a computer's memory.
128 numeric codes
A byte is made up of ___________ bits.
8
What number does a bit that is turned on represent? What number does a bit that is turned off represent?
A bit that is on is represented by the digit 1 and a bit that is off is represented by the digit0 (Gaddis, 2010 Chap 1)
19. If you were to look at a machine language program, you would see ________. - Python code - a stream of binary numbers - English words - circuits
A stream of binary numbers
8. A component that collects data from people or other devices and sends it to the computer is called . - an output device - an input device - a secondary storage device - main memory
An input device
22. The translates an assembly language program to a machine language program. - assembler - compiler - translator - interpreter
Assembler
12. In the numbering system, all numeric values are written as sequences of 0s and 1s. - hexadecimal - binary - octal - decimal
Binary
When a program runs on a computer, the part of the computer that carries out the instructions is called the ___?
CPU
25. A(n) program translates a high-level language program into a separate machine language program. - assembler - compiler - translator - utility
Compiler
A mistake that is usually caused by a misspelled key word, a missing punctuation character, or the incorrect use of an operator is called a logical error.
False
A syntax error does not prevent a program from being compiled and executed.
False
Assembly language is considered a high-level language.
False
Images, like the ones created with your digital camera, cannot be stored as binary numbers.
False
The amount of memory enough to store a letter of the alphabet or a small number is one bit.
False
Windows, Linux, Android, iOS, and macOS are all examples of application software.
False
Word processing programs, spreadsheet programs, email programs, web browsers, and games are all examples of utility programs.
False
17. Real numbers are encoded using the ______ technique. - two's complement - floating point - ASCII - Unicode
Floating Point
2. The physical devices that a computer is made of are referred to as . - hardware - software - the operating system - tools
Hardware
What are the short words that are used in assembly language called?
Instead of using binary numbers for instructions, assembly language uses short words that are known as mnemonics. (Gaddis, 2010 Chap 1, 1.4 How a Program Works
23. The words that make up a high-level programming language are called . - binary instructions - mnemonics - commands - key words
Key words
21. Computers can only execute programs that are written in . - Java - assembly language - machine language - Python
Machine Language
4. Today, CPUs are small chips known as . - ENIACs - microprocessors - memory chips - operating systems
Microprocessors
9. A video display is a(n) device. - output - input - secondary storage - main memory
Output
6. This is a volatile type of memory that is used only for temporary storage while a program is running. - RAM - secondary storage - the disk drive - the USB drive
RAM
7. A type of memory that can hold data for long periods of time, even when there is no power to the computer, is called . - RAM - main memory - secondary storage - CPU storage
Secondary Storage
24. The rules that must be followed when writing a program are called . - syntax - punctuation - key words - operators
Syntax
3. The part of a computer that runs programs is called . - RAM - secondary storage - main memory - the CPU
The CPU
What are the words that make up a high-level programming language called?
The words that make up a high-level programming language are known as key words or reserved words (Gaddis, 2010 Chap. 1, 1.4 How a Program Works)
A high-level programming language allows you to create powerful and complex programs without knowing how the CPU works.
True
An interpreter is a program that both translates and executes the instructions in a high-level language program.
True
Any piece of data that is stored in a computer's memory must be stored as a binary number.
True
Digital data is data that is stored in binary format.
True
Machine language is the only language that a CPU understands.
True
Main memory is also known as RAM.
True
The binary numbering system are all numeric values written as sequences of 0s and 1s.
True
16. Negative numbers are encoded using the ____ Technique. - two's complement - floating point - ASCII - Unicode
Two's Complement
15. An extensive encoding scheme that can represent characters for many languages in the world is . - binary numbering - ASCII - Unicode - ENIAC
Unicode
What encoding scheme is extensive enough to represent the characters of many of the languages in the world?
Unicode
A bit is
a binary digit, like 0 or 1
Word processing programs, spreadsheet programs, email programs, web browsers, and game programs belong to what category of software?
application software
What format uses short words that are known as mnemonics?
assembly language
An error in a program that involves a violation of language rules will be detected at ____
compile
What type of program translates a high-level language program into a separate machine language program?
compiler
When a CPU executes the instructions in a program, it is engaged in what process?
fetch-decode-execute cycle
What term refers to the physical devices, or components, of which a computer is made?
hardware
The program that can read Python programming statements and execute them is called a Python _________.
interpreter
A binary digit
is zero or one.
Words that have a special meaning in a programming language are called _____.
key words
A CPU understands instructions that are written only in _________.
machine language
What part of the computer serves as a work area to store a program and its data while the program is running?
main memory
What fundamental set of programs control the internal operations of the computer's hardware?
operating system
Monitors, printers, status lights are all examples of _______ devices?
output
What part of the computer formats and presents data for people or other devices?
output device
Type a Python statement that will display the following line of text:I am coding in Python!
print("I am coding in Python!")
When programming in _________ mode, the interpreter reads the contents of a file that contains Python statements and executes each statement as it reads it.
script
What part of the computer holds data for long periods of time, even when there is no power to the computer?
secondary storage
A program is a(n) ________ that a computer follows to perform a task.
set of instructions
The code that a programmer writes is called _____ code.
source
Each language has a set of rules that must be strictly followed when writing a program. What is this set of rules called?
syntax
The rules that govern the correct order and usage of the elements of a language are called the ______ of the language.
syntax
What part of the computer actually runs programs?
the CPU
A compiler
translates source code into executable machine language code
What do you call a program that performs a specialized task, such as a virus scanner, a file compression program, or a data backup program?
utility program
True or False Today, CPUs are huge devices made of electrical and mechanical components such as vacuum tubes and switches.
False
Which statement is not true: * Machine languages can be used to express algorithms. * Machine languages can be used to write programs that can run on any machine. * Machine language is produced by compilers. * Machine language consists of zeros and ones
Machine languages can be used to write programs that can run on any machine.
What type of software controls the internal operations of the computer's hardware?
Operating Systems An operating system is the most fundamental set of programs on a computer. The operating system controls the internal operations of the computer's hardware, manages all of the devices connected to the computer, allows data to be saved to and retrieved from storage devices, and allows other programs to run on the computer.
When a program runs on a computer, it is stored in _____?
RAM
Short Answer Why is the CPU the most important component in a computer?
The central processing unit is the most important because without it the computer can't run the programs or software (Gaddis, 2010 1.2 Hardware and Software)
A tiny "switch" that can be set to either on or off is called a _________.
bit
11. A byte is made up of eight . - CPUs - instructions - variables - bits
bits
10. A is enough memory to store a letter of the alphabet or a small number. - byte - bit - switch - transistor
byte