python exam 1

Ace your homework & exams now with Quizwiz!

dual alternative

The decision structure that has two possible paths of execution is known as

or, and

Which logical operators perform short-circuit evaluation?

decision

a __ structure can execute a set of statements only under certain circumstances

logic

a ___ error does not prevent the program from running, but it causes it to produce incorrect results

flowchart

a ___ is a diagram that graphically depicts the steps that take place in a program

named constant

a ___ is a name that represents a value that does not change during the program's execution

string

a ___ is a sequence of characters

software requirement

a ___ is a single function that the program must perform in order to satisfy the customer

user

a ___ is any hypothetical person using a program and providing input for it

single alternative decision

a ___ structure provides one alternative path of execution

and

a compound Boolean expression created with the __ operator is true only if both of its subexpressions are true

or

a compound Boolean expression created with the ___ operator is true if either of its subexpressions is true

machine language

a cpu understands instructions that are written only in what language

function

a piece of prewritten code that performs an operation

main memory (RAM)

a program has to be copied into what type of memory each time the CPU executes it

escape character

a special character that is preceded with a backslash (\)

either single or double quote marks

a string literal in python must be enclosed in ___

boolean

a(n) ___ expression has a value of either True or False

algorithm

a(n) ___ is a set of well-defined logical steps that must be taken to perform a task

if statement

a(n) ___ structure tests a condition and then takes one path if the condition is true, or another path if the condition is false

hardware

all the physical devices of which a computer is made

mixed-type expression

an expression that uses operands of different data types is called ___

pseudocode

an informal language that has no syntax rules and its not meant to be compiled or executed is called ___

magic number

an unexplained value that appears in a program's code is a ____

logical

and, or, and not are ___ operators

digital device

any device that works with binary data

assembly language

any low-level programming language with a very strong correspondence between the instructions in the language and the architecture's machine code instructions

machine language

computers can only execute programs that are written in

digital date

data stored in binary format

syntax

each language has a set of rules that must be strictly followed when writing a program. what is this set of rules called

central processing unit, main memory, secondary storage devices, input devices, and output devices

five major components of a computer system

a stream of binary numbers

if you were to look at a machine language program, you would see

decode

in the ___ part of the fetch-decode-execute cycle, the CPU determines which operation it should perform

operands

in the expression 12+7, the values on the right and left of the + symbol are called ___

binary numbering system

in what numbering system are all numeric values written as sequences of 0s and 1s

two's compliment

negative numbers are encoded using a technique known as

floating-point

real numbers are encoded in what notation

program

set of instructions that a computer follows to perform a task

comments

short notes placed in different parts of a program explaining how those parts of the program work are called ____

float

suppose the following statement is in a program: price = 99.0. After this statement executes, the price variable will reference a value of which data type?

not

the ___ operator takes a Boolean expression and its operand and reverses its logical value

assembler

the ___ translates an assembly language program into a machine language program

relational

the symbols >, <, and === are all ___ operators

pixels

the tiny dots that images are composed of

keywords

the words that make up a high-level programming language

**

this is an operator that raises a number to a power

%

this operator performs division, but instead of returning the quotient it returns the remainder

//

this operator performs integer division

#

this symbol marks the beginning of a comment in python

one byte

what amount of memory is enough to store a letter of the alphabet or a small number

utility program

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

compiler

what do you call a program that translates a high-level language program into a separate machine language program

interpreter

what do you call a program that translates and executes the instructions in a high-level language program

bit

what do you call a tiny "switch" that can be set to either on or off

unicode

what encoding scheme is extensive enough to represent the characters of many of the languages in the world

operating system

what fundamental set of programs control the internal operations of the computer's hardware

transmitting information between computers

what is the purpose of ASCII

central processing unit

what part of the computer actually runs programs

input devices

what part of the computer collects data from people and from other devices

output devices

what part of the computer formats and presents data for people or other devices

secondary storage devices

what part of the computer holds data for long periods of time, even when there is no power on the computer

main memory

what part of the computer serves as a work area to store a program and its data while the program is running

syntax error

what type of mistake is usually caused by a misspelled keyword, a missing punctuation character, or the incorrect use of an operator

high-level language

what type of programming language allows you to create powerful and complex programs without knowing how the cpu works

fetch-decode-execute cycle

when a cpu executes the instructions in a program, it is engaged in what process

float()

which built-in function can be used to convert an int variable to a float

input()

which built-in function can be used to read input that has been typed on the keyboard

17 = x

which of the following statements will cause an error? (x = 17, 17 = x, x = 9999, x = '17')

application software

word processing programs, spreadsheet programs, email programs, web browsers, and game programs belong to what category of software

if-else

you use a(n) ___ statement to write a dual alternative decision structure

if

you use a(n) ___ statement to write a single alterative decision structure

control

A(n) __________ structure is a logical design that controls the order in which a set of statements execute.


Related study sets

Nutrition chapter 1: Introduction

View Set

Statements about what is true of disciples of Christ

View Set

Weekend 4: Pricing Strategies; Agency Issues

View Set

CompTIA A+ 220-1102 (Core 2) Domain 1: Operating Systems

View Set

8.03 Cultural Identity and Morality Quiz

View Set

Anatomy Joint Movements and Examples

View Set

Chapter 2: Communicating over the network

View Set