Computer Science Foundations Final Exam

¡Supera tus tareas y exámenes ahora con Quizwiz!

The line continuation character is a ____. A. % B. # C. \ D. &

The answer is \ (left slash)

The first input operation is called the _____, and its purpose is to get the first input value that will be tested by the validation loop. A. First input B. Priming read C. Loop validation D. Loop set read

The answer is priming read.

Which language from the following list is referred to as a low-level language? A. Assembly language B. C++ C. Python D. JAVA

The answer is Assembly Language.

Which computer language uses short words known as mnemonics for writing programs? A. Java B. Assembly C. Visual Basic D. Pascal

The answer is Assembly.

A set of statements that belong together as a group and contribute to the function definition is known as a(n) _____. A. Block B. Header C. Parameter D. Return

The answer is Block.

What type of function can be used to determine whether a number is even or odd? A. odd B. even C. Boolean D. math

The answer is Boolean.

What type of loop structure repeats the code based on the value of the Boolean expression? A. Number-controlled loop B. Condition-controlled loop C. Count-controlled loop D. Boolean-controlled loop

The answer is Condition-controlled loop.

What type of loop structure repeats the code a specific number of times? A. Number-controlled loop B. Condition-controlled loop C. Boolean-controlled loop D. Count-controlled loop

The answer is Count-controlled loop.

Which of the following is not a microprocessor manufacturing company? A. Dell B. Intel C. Motorola D. AMD

The answer is Dell.

Which of the following is considered to be the world's first programmable electronic computer? A. DELL B. IBM C. GATEWAY D. ENIAC

The answer is ENIAC.

In a print statement, you can set the ____ argument to a space or empty string to stop the output from advancing to a new line. A. End B. Stop C. newLine D. separator

The answer is End.

The program development cycle is made up of ______ steps that are repeated until no errors can be found in the program. A. Five B. Three C. Six D. Four

The answer is Five.

After the execution of the following statement, the variable sold will reference the numeric literal value as a(n) _____ data type: sold = 256.752. A. float B. int C. currency D. str

The answer is Float.

A(n) ____ is a diagram that graphically depicts the steps that take place in a program. A. Psuedocode B. Code C. Flowchart D. Algorithm

The answer is Flowchart.

A(n) _____ constant is a global name that references a value that cannot be changed. A. Local B. Keyword C. String D. Global

The answer is Global.

A(n) _____ variable is accessible to all the functions in a program file. A. Local B. Keyword C. String D. Global

The answer is Global.

The first line in the function definition is known as the function ____. A. Block B. Header C. Parameter D. Return

The answer is Header.

The output of the following print statement is: print 'I\'m ready to begin' A. Im ready to begin B. I\'m ready to begin C. I'm ready to begin D. 'I\'m ready to begin'

The answer is I'm ready to begin.

_____ is the process of inspecting data that has been input to a program to make sure is is valid before it is used in computation. A. Correcting data B. Input validation C. Correcting input D. Data Validation

The answer is Input validation.

The ____ function reads a piece of data that has been entered at the keyboard and returns that piece of data, as a string, back to the program. A. Output B. Input C. string_input D. Eval_input

The answer is Input.

The Python library functions that are built into the Python _____ can be used by simply calling the function. A. Compiler B. Code C. Interpreter D. Linker

The answer is Interpreter.

The _____ argument specifies which parameter the argument should be passed into. A. Local B. Keyword C. String D. Global

The answer is Keyword.

A(n) ____ variable is created inside a function. A. Global B. Constant C Local D. Defined

The answer is Local.

What type of error produces incorrect results but does not prevent the program from running? A. Grammatical B. Syntax C. Logic D. Human

The answer is Logic.

When does a computer store a program and the data that the program is working with while the program is running? A. CPU B. Main Memory C. Microprocessor D.Secondary storage

The answer is Main Memory.

The Python standard library's _____ module contains numerous functions that can be used in mathematical calculations. A. string B. math C. number D. random

The answer is Math.

Which of these is not a major component of a typical computer system? A. Main memory B. Central Processing Unit C. Secondary Storage devices D. Operating System

The answer is Operating System.

What is the informal language that programmers use to create models of programs that have no syntax rules and are not meant to be compiled or executed. A. Algorithm B. Flowchart C. Psuedocode D. Code

The answer is Psuedocode.

What symbol is used to mark the beginning and end of a string? A. Asterisk B. Slash C. Comma D. Quotation

The answer is Quotation.

What type of volatile memory is usually used only for temporary storage while running a program? A. TMM B. ROM C. Motorola D. AMD

The answer is RAM.

In a value-returning function, the value of the expression that follows the key word _____ will be sent back to the part of the program that called the function. A. return B. def C. result D. sent

The answer is Return.

The _____ of a local variable is the function in which the variable is created. A. Defined B. Global C. Scope D. Local

The answer is Scope.

Python comes with _____ functions that have been already prewritten for the programmer. A. Library B. Standard C. Built-in D. Custom

The answer is Standard.

In Python, the variable in the for clause is referred to as the _____ because it is the target of an assignment at the beginning of each loop iteration. A. Loop variable B. Target Variable C. Count variable D. For variable

The answer is Target variable.

A value-returning function is _____. A. called when you want the function to stop B. a single statement that perform a specific task C. a function that receives a value when it is called D. a function that will return a value back to the part of the program that called it

The answer is a function that will return a value back to the part of the program that called it.

A ____ has no moving parts, and operates faster than a traditional disk drive. A. solid state drive B. DVD drive C. hyper drive D. floppy disk

The answer is a solid state drive.

The process known as the _____ cycle is used by the CPU to execute instructions in a program. A. decode-execute-fetch B. decode-fetch-execute C. fetch-execute-decode D. fetch-decode-execute

The answer is fetch-decode-execute.

In a menu-driven program, what statement is used to determine and carry out the user's desired action? A. if-elif-else B. if-else C. for D. while

The answer is if-elif-else.

The ____ built-in function is used to read a number that has been typed on the keyboard. A. read() B. input() C. keyboard() D. get()

The answer is input()

Which of the following will assign a random number in the range of 1 through 50 to the variable :*number* A. Random (1,50) = number B. number = random.randint (1,50) C. randint (1,50) = number D. number = random(range(1,50))

The answer is number = random.randint (1,50).

A(n) _____ is any piece of data that is passed into a function when the function is called. A. Argument B. Global C. Parameter D. Scope

The answer is Argument.

What is the disadvantage of coding in one long sequence structure? A. Writing a long sequence of statements is error prone. B. Duplicated code makes the program faster to write. C. It does not make use of decision structures. D. If parts of the duplicated code have to be corrected, the correction has to be made many times.

The answer is "If parts of the duplicated code have to be corrected, the correction has to be made many times."

What is the format for the while clause in Python? A. while condition : B. while condition C. while condition : statement D. while condition statement

The answer is "while condition : "

What are the values that the variable num contains through the iterations of the following for loop? A. 0,1,2,3,4 B. 1,2,3,4 C. 0,1,2,3 D. 1,2,3

The answer is 0,1,2,3.

If value1 is 2.0 and value2 is 12, what is the output of the following command? print (value1 * value2) A. value1 * value2 B.24 C. 2.0 * 12 D. 24.0

The answer is 24.0.

Given the following function definition, what would the statement "print magic(5)" display? def magic (num): return num + 2 * 1 A. 25 B. 70 C. Statement will cause a run-time error. B. Statement will cause a syntax error

The answer is 25.

What is the largest value that can be stored in one byte? A. 128 B. 255 C. 65535 D. 8

The answer is 255.

After the execution of the following statement, the variable price will reference the value ____. [price = int (68.549)] A. 69 B. 68 C. 68.54 D. 68.55

The answer is 68.

What is the result of the following statement? x = random.randint (5 , 15) * 2 A. A random integer from 5 to 15, multiplied by 2, assigned to the variable "x" B. A random integer from 5 to 15 assigned to the variable "x" C. A random integer from 5 to 15, selected in 2 steps, assigned to the variable "x" D. A random integer from 5 to 15, raised to the power of 2, assigned to the variable "x"

The answer is A random integer from 5 to 15, multiplied by 2, assigned to the variable "x"

The ____ coding scheme contains a set of 128 numeric codes that are used to represent characters in the computer memory. A. ASCII B. Unicode C. twos complement D. ENIAC

The answer is ASCII.


Conjuntos de estudio relacionados

PrepU: Ch. 20 Assessment of Respiratory Function

View Set

EMT Chapter 24, 26-29, & 31 Trauma Overview, Soft Tissue Injuries, Face and Neck Injuries, Head and Spine Injuries, Chest Injuries, Orthopedic Injuries

View Set

Sheep and Goat management exam 1

View Set