Starting Out with Python, 3e Ch 1

Ace your homework & exams now with Quizwiz!

What are the words that make up a high-level programming language called?

Keywords because they are the words that convey special meaning to the compiler or interpreter.

A(n) is a set of instructions that a computer follows to perform a task. a. compiler b. program c. interpreter d. programming language

program

A type of memory that can hold data for long periods of time, even when there is no power to the computer, is called __________ a. RAM b. main memory c. secondary storage d. CPU storage

secondary storage

The rules that must be followed when writing a program are called __________ a. syntax b. punctuation c. key words d. operators

syntax

A compiler a. maintains a collection of programs b. tests a program's logic c. translates source code into executable code d. translates executable code to machine code

translates source code into executable code

Why is the CPU the most important component in a computer?

It is the brain of the computer and is the place that actually runs the programs.

What type of software controls the internal operations of the computer's hardware?

System Software. Such as Windows, Linux, Mac OS

RAM, random-access memory, is called that because: a. it is optimized for random number processing. b. accesses are randomized to prevent clogging the control lines. c. you can pick any two random locations and it will take the same time to access the data. d. when power is turned off, its contents are lost and replaced by random bits. e. none of the above.

You can pick any two random locations and it will take the same time to access the data.

An operating system a. is the chief hardware unit in a computer. b. is loaded into the computer each time it needs to carry out an operation. c. ensures that programs will not run on the computer at the same time. d. allocates resources like memory to programs that are running. e. all of the above.

allocates resources like memory to programs that are running.

A component that collects data from people or other devices and sends it to the computer is called __________ a. an output device b. an input device c. a secondary storage device d. main memory

an input device

At each step of its operation, the input to a Central Processing Unit is: a. a program. b. an instruction. c. main memory. d. a control unit.

an instruction

In the __________ numbering system, all numeric values are written as sequences of Os and 1s. a. hexadecimal b. binary c. octal d. decimal

binary

A byte is made up of eight __________ a. CPUs b. instructions c. variables d. bits

bits

A(n) _________ program translates a high-level language program into a separate machine language program. a. assembler b. compiler c. translator d. utility

compiler

Application software a. processes applications for jobs, school admission, etc. b. is any software that runs with the support of the operating system. c. was invented by Microsoft. d. is applied to the computer for the purpose of running the operating system. e. none of the above.

is any software that runs with the support of the operating system.

A binary digit a. is either positive or negative. b. is zero or one. c. requires one byte of storage. d. is 2. e. is none of the above.

is zero or one

The words that make up a high-level programming language are called __________ a. binary instructions b. mnemonics c. commands d. key words

key words

Computers can only execute programs that are written in __________ a. Java b. assembly language c. machine language d. Python

machine language

When a program is not running, it is stored a. on a disk. b. in level-2 cache (L2). c. in main memory. d. on the ethernet or wifi.

on a disk

Monitors, printers, status lights are all examples of _______ devices.

output

The tiny dots of color that digital images are composed of are called __________ a. bits b. bytes c. color packets d. pixels

pixels

The part of a computer that runs programs is called a. RAM b. secondary storage c. mam memory d. the CPU

the CPU

A bit that is turned off represents the following value: a. 1 b. -1 c. 0 d. "no"

0

What would you call a device that works with binary data?

A digital device. Such as a computer or digital camera.

When a program runs on a computer, the part of the computer that carries out the instructions is called the _______.

CPU

What is the difference between a compiler and an interpreter?

Compiler Compiler is a program that translates a high level code into machine language. In case of this, compiling and executing are two different processes. Compiler scans the entire program on the whole and report for errors. Example: C++ programming language uses compiler. Interpreter Interpreter is a special program that does the translation and simultaneously executes each and every instruction also. In this, both translation and execution are done simultaneously. Interpreter performs the translation and execution line by line and reports the error if any. Example: Python Programming language uses interpreter.

A syntax error does not prevent a program from being compiled and executed. T or F

False

Assembly language is considered a high-level language. T or F

False

Images, like the ones you make with your digital camera, cannot be stored as binary numbers. T or F

False

Today, CPUs are huge devices made of electrical and mechanical components such as vacuum tubes and switches. T or F

False

Word processing programs, spreadsheet programs, email programs, web browsers, and games are all examples of utility programs. T or F

False

Which of these is not a programming language? a. C b. C++ c. HTML d. Java

HTML

What best defines a "programming language"? a. It allows us to control a computer. b. It allows us to make a calculation. c. It allows to execute a program. d. It allows us to express an algorithm.

It allows us to express an algorithm

Which statement is NOT true: a. Machine languages can be used to express algorithms. b. Machine languages can be used to write programs that can run on any machine. c. Machine language consists of zeros and ones. d. Machine language is produced by compilers.

Machine languages can be used to write programs that can run on any machine.

When a program runs on a computer, it is stored in _______.

RAM

This is a volatile type of memory that is used only for temporary storage while a program is running. a. RAM b. secondary storage c. the disk drive d. the USB drive

RAM (Random Access Memory)

An interpreter is a program that both translates and executes the instructions in a high level language program. T or F

True

Any piece of data that is stored in a computer's memory must be stored as a binary number. T or F

True

Machine language is the only language that a CPU understands. T or F

True

Main memory is also known as RAM. T or F

True

An extensive encoding scheme that can represent characters for many languages in the world is __________ a. binary numbering b. ASCII c. Unicode d. ENIAC

Unicode

A bit is a. a metallic rod inserted into a horses mouth to control it while riding. b. a small amount of data. c. an alternative term for byte. d. an electronic device used in computers. e. a binary digit, like 0 or 1.

a binary digit, like 0 or 1

If you were to look at a machine language program, you would see __________ a. Python code b. a stream of binary numbers c. English words d. circuits

a stream of binary

A byte in memory is identified by a unique number called its _______.

address

This ___________ translates an assembly language program to a machine language program. a. assembler b. compiler c. translator d. interpreter

assembler

A __________ is enough memory to store a letter of the alphabet or a small number. a. byte b. bit c. switch d. transistor

byte

An error in a program that involves a violation of language rules will be detected at _______ time.

compile

In the __________ part of the fetch-decode-execute cycle, the CPU determines which operation it should perform. a. fetch b. decode c. execute d. immediately after the instruction is executed

decode

Real numbers are encoded using the _______ technique. a. two's complement b. floating point c. ASCII d. Unicode

floating point

The physical devices that a computer is made of are referred to as __________. a. hardware b. software c. the operating system d. tools

hardware

Mice, trackpads, keyboards, scanners, joysticks are all examples of ________ devices.

input

Words that have a special meaning in a programming language are called ________.

keywords

The computer stores a program while the program is running, as well as the data that the program is working with, in __________ a. secondary storage b. the CPU c. main memory d. the microprocessor

main memory

Today, CPUs are small chips known as __________ a. ENIACs b. microprocessors c. memory chips d. operating systems

microprocessors

What are the short words that are used in assembly language called?

mnemonics

A video display is a(n) ________ device. a. output b. input c. secondary storage d. main memory

output

Flash drives, CDs, external disks are all examples of ________ storage (memory) devices.

secondary

The code that a programmer writes is called ________ code.

source

The rules that govern the correct order and usage of the elements of a language are called the _______ of the language

syntax

Negative numbers are encoded using the __________ technique. a. two's complement b. floating point c. ASCII d. Unicode

two's complement

What number does a bit that is turned on represent? What number does a bit that is turned off represent?

1 represents a bit that is turned on. 0 represents a bit that is turned off.

A set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters is __________ a. binary numbering b. ASCII c. Unicode d. ENIAC

ASCII

Windows, Linux, Android, iOS, and Mac OSX are all examples of application software. T or F

False


Related study sets

International Business Chapter 9

View Set

Series 65 Exam questions Source Pass The Exam

View Set

Math Quiz Eliminate Decimal Points

View Set

(Book 4) Ch. 1 - Contract Law Overview

View Set

A37 CH10: QUIZ- BEDMAKING & UNIT CARE - MELBENZ

View Set