Maybe the Best Deck for FINAL

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

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

0

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.

What is a base case?

A case in which the problem can be solved without recursion

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

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

It is said that a recursive algorithm has more overhead than an iterative algorithm. What does this mean?

A recursive algorithm requires multiple method calls. Each method call requires several actions to be performed

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

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 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.

When a StringVar object is associated with a ______ ______, the ______ ______ displays any data that is stored in the StringVar object.

Label widget

You use the ______ ______ to display text in a window.

Label widget

You use the ______ ______ to create a standard button in a window. When the user clicks a button, a specified function or method is called.

Button widget

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

CPU

What is a recursive case?

Cases in which the problem is solved using recursion

______ buttons, which may appear alone or in groups, allow the user to make yes/no or on/off selections.

Check

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.

An ______ ______ is a rectangular area that the user can type input into.

Entry widget

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

In the base case, a recursive method calls itself with a smaller version of the original problem. T or F

False

It is not necessary to have a base case in all recursive algorithms. T or F

False

Some problems can be solved through recursion only. 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

Windows, Linux, Android, iOS, and Mac OSX are all examples of application software. 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

A ______ is a container that can hold other widgets.

Frame

You can use ______ to organize the widgets in a window.

Frames

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

HTML

What is direct recursion?

In direct recursion, a recursive method calls itself

What is indirect recursion?

In indirect recursion, method A calls method B, which in turn calls method A.

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)

______ buttons normally appear in groups of two or more and allow the user to select one of several possible options.

Radio

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

System Software. Such as Windows, Linux, Mac OS

Fibonacci series

The Fibonacci numbers, named after the Italian mathematician Leonardo Fibonacci, are a sequence of numbers that after the second number, each number in the series is the sum of the two previous numbers.

the process of calling a function requires several actions to be performed by the computer. These actions include allocating memory for parameters and local variables and storing the address of the program location where control returns after the function terminates.

These actions, which are sometimes referred to as overhead, take place with each function call. Such overhead is not necessary with a loop.

An algorithm that uses a loop will usually run faster than an equivalent recursive algorithm. T or F

True

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

What causes a recursive algorithm to stop calling itself?

When it reaches the base case

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.

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

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

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

assembler

The part of a problem that can be solved without recursion is the ______ case. a. base b. solvable c. known d. iterative

base

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 __________ is enough memory to store a letter of the alphabet or a small number. a. byte b. bit c. switch d. transistor

byte

A recursive function ______. a. calls a different function b. abnormally halts the program c. calls itself d. can only be called once

calls itself

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

compile

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

compiler

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

When a function explicitly calls itself it is called _______ recursion. a. explicit b. modal c. direct d. indirect

direct

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

floating point

A function is called once from a program's main function, and then it calls itself four times. The depth of recursion is ______. a. one b. four c. five d. nine

four

You use the Entry widget's ______ ______ to retrieve the data that has been typed into the widget.

get method

A ______ ______ ______ allows the user to interact with the operating system and other programs using graphical elements such as icons, buttons, and dialog boxes.

graphical user interface

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

hardware

When function A calls function B, which calls function A, it is called ______ recursion. a. implicit b. modal c. direct d. indirect

indirect

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

input

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 part of a problem that is solved with recursion is the _______ case. a. base b. iterative c. unknown d. recursion

iterative

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

key words

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

keywords

Any problem that can be solved recursively can also be solved with a ______. a. decision structure b. loop c. sequence structure d. case structure

loop

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

machine language

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

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

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

output

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

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 function that calls itself

recursive function

A recursive algorithm must ______ in the recursive case. a. solve the problem without recursion b. reduce the problem to a smaller version of the original problem c. acknowledge that an error has occurred and abort the program d. enlarge the problem to a larger version of the original problem

reduce the problem to a smaller version of the original problem

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

secondary

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

Actions taken by the computer when a function is called, such as allocating memory for parameters and local variables, are referred to as ______. a. overhead b. set up c. clean up d. synchronization

set up

A problem can be solved with recursion if it can be broken down into ______ ______ that are identical in structure to the overall problem.

smaller problems

A recursive algorithm must ______ in the base case. a. solve the problem without recursion b. reduce the problem to a smaller version of the original problem c. acknowledge that an error has occurred and abort the program d. enlarge the problem to a larger version of the original problem

solve the problem without recursion

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

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

syntax

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

the CPU

The number of times that a function calls itself is known as

the depth of recursion

In Python you can use the ______ module to create simple GUI programs.

tkinter

An info dialog box is a simple window that displays a message to the user and has an OK button that dismisses the dialog box. You can use the ______ ______ ______ function to display an info dialog box.

tkinter.messagebox module's showinfo

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

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

two's complement


Set pelajaran terkait

Quiz 11 Wealth Mngmnt (FI:077, PD:313, PD:309)

View Set

Chapter 7: Legal Dimensions of Nursing Practice

View Set

Chapter 1: A Framework for Maternal and Child Health Nursing

View Set

american lit poetry discussion questions

View Set

UNIT 2: ACCOUNTING FOR PARTNERSHIP

View Set

Week 3. Ethnocentrism and Cultural Relativism

View Set

Chapter 9 Banking and the Management of Financial Institutions

View Set

Biology Section 1-1 Review: The World Of Biology

View Set