Docsity

STARTING OUT WITH PYTHON 6 LEARNING WORKBOOK PYTHON BASICS DATA TYPES AND CONTROL STRUCTUR, Exams of Information and Communications Technology (ICT)

Toggle sidebar
bg1
STARTING OUT WITH PYTHON 6 LEARNING WORKBOOK PYTHON
BASICS DATA TYPES AND CONTROL STRUCTURES FULL QUESTIONS
AND CORRECT ANSWERS STUDY GUIDE
Question 1.
The physical devices, or components, of which a computer is made of are referred to as
_____?
Answer: Hardware
Question 2.
List the five major components of a computer system.
Answer: The CPU, main memory, secondary storage devices, input devices, and
output devices.
Question 3.
What part of the computer actually runs programs?
Answer: Central Processing Unit (CPU)
Question 4.
What part of the computer serves as a work area to store a program and its data while the
program is running?
Answer: Main memory or Random Access Memory (RAM)
Question 5.
What part of the computer holds data for long periods of time, even where there is no
power to the computer?
Answer: Secondary storage devices (Disk drive, SSD, USB Drive, flash drives,
optical drives)
Question 6.
What part of the computer formats and presents data for people or other devices?
Answer: Output devices
Question 7.
What fundamental set of programs control the internal operations of the computer's
hardware?
Answer: Operating Systems
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download STARTING OUT WITH PYTHON 6 LEARNING WORKBOOK PYTHON BASICS DATA TYPES AND CONTROL STRUCTUR and more Exams Information and Communications Technology (ICT) in PDF only on Docsity!

STARTING OUT WITH PYTHON 6 LEARNING WORKBOOK PYTHON

BASICS DATA TYPES AND CONTROL STRUCTURES FULL QUESTIONS

AND CORRECT ANSWERS STUDY GUIDE

Question 1.

The physical devices, or components, of which a computer is made of are referred to as _____?

Answer: Hardware

Question 2.

List the five major components of a computer system.

Answer: The CPU, main memory, secondary storage devices, input devices, and output devices.

Question 3.

What part of the computer actually runs programs?

Answer: Central Processing Unit (CPU)

Question 4.

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

Answer: Main memory or Random Access Memory (RAM)

Question 5.

What part of the computer holds data for long periods of time, even where there is no power to the computer?

Answer: Secondary storage devices (Disk drive, SSD, USB Drive, flash drives, optical drives)

Question 6.

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

Answer: Output devices

Question 7.

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

Answer: Operating Systems

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?

Answer: Utility Programs

Question 9.

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

Answer: Application Software

Question 10.

Today, CPU's are small chips known as _____?

Answer: Microprocessors

Question 11.

This is a volatile type of memory that is only for temporary storage while a program is running.

Answer: RAM or Random Access Memory

Question 12.

A type of memory that can hold data for long periods of time, even when there is no power to the computer, is called ____.

Answer: Secondary Storage

Question 13.

A component that collects data from people or other devices and sends it to the computer is called ____.

Answer: An input device

Question 14.

A video display is a(n) __________ device.

Answer: output

Question 15.

A _________ is enough memory to store a letter of the alphabet or a small number.

Answer: Byte

block

Answer: a set of statements that belong together as a group; performed any time the function is executed

Question 25.

mainline logic

Answer: the overall logic of the program;contained in the main function

Question 26.

main function

Answer: called when a program starts, then calls other functions in the program as needed

Question 27.

top down design

Answer: Programmers commonly use a technique known as ________ to break down an algorithm into functions

Question 28.

hierarchy charts

Answer: shows boxes that represent each function in a program

Question 29.

local variable

Answer: anytime you assign a value to a variable inside a function;belongs to the function in which it is created, and only statements inside that function can access the variable

Question 30.

scope

Answer: the part of a program in which the variable may be accessed. a variable is visible only to statements in the variable's scope. a local variable's scope is the function in which the variable is created.

Question 31.

argument

Answer: any piece of data that is passed into a function when the function is called

parameter

Answer: a variable that receives an argument that is passed into a function;a special variable that is assigned the value of an argument when a function is called.

Question 33.

parameter variable scope

Answer: the function in which the parameter is used; all of the statements inside the function can access the parameter variable, but no statement outside the function can access it.

Question 34.

by position

Answer: the first argument is passed to the first parameter variable, and the second argument is passed to the second argument parameter

Question 35.

true

Answer: any changes to that are made to the parameter variable will not affect the argument

Question 36.

pass by value

Answer: The form of argument passing that is used in Python, where a function cannot change the value of an argument that was passed to it.

Question 37.

keyword argument

Answer: An argument that includes the name of the parameter as a "keyword.";specifies which parameter variable the argument should be passed to

Question 38.

true

Answer: it is possible to mix positional arguments and keyword arguments in a function call, but the positional arguments must appear first followed by the keyword argumens

psuedorandom numbers

Answer: the numbers that are generated by the function in the random module are not truly random, the are actually ________ that are calculated by a formula

Question 48.

seed value

Answer: the formula that generates random numbers has to be initialized with a value known as a _______.;used in the calculation that returns the next random number in the series

Question 49.

value returning statement

Answer: has a return statement that returns a value back to the part of the program that called it;must have a return statement

Question 50.

IPO chart

Answer: a simple but effective tool programmers use for designing and documenting functions (Input Processing Output); describes the input, processing, and output of a function.

Question 51.

math module

Answer: contains numerous functions that can be used in mathematical calculations

Question 52.

module

Answer: a file that contains Python code; large programs are easier to debug and maintain when they are divided into modules

Question 53.

Output file

Answer: A file that data is written to.

Question 54.

Input file

Answer: A file that data is read from.

Question 55.

Opened

Answer: Before a file can be used by a program it must be...

Question 56.

Closed

Answer: When a program is finished with a file it should be....

Question 57.

Text file

Answer: The contents of this type of file can be viewed in a program like Notepad.

Question 58.

Binary file

Answer: This type of file has data that has not been concerted to text.

Question 59.

Sequential access

Answer: When working with this type of fike, you access its data from the beginning of the file to the end of the file.

Question 60.

Direct access

Answer: When working with this type of file, you can jump directly to any piece of data in the file without reading the data that come before it.

Question 61.

Buffer

Answer: This is a small "holding section" in memory that many systems write data to before writing the data to a file.

Question 62.

Read position

Answer: This marks the location of the next item that will be read from a file.

Answer: Causes python interpreter to read the backslash characters as literal backslashes, -r option

Question 72.

Method

Answer: Function that belongs to an object and performs some operation using that object

Question 73.

rstrip

Answer: removes specific characters from the end of a string

Question 74.

str

Answer: Built-in function that converts a value to a string

Question 75.

record

Answer: complete set of data that describes one item

Question 76.

traceback

Answer: An error message that gives information regarding the line numbers that caused the exception

Question 77.

exception

Answer: An error that occurs while a program is running.

Question 78.

try suite

Answer: one or more statements that can potentially raise an exception

Question 79.

exception object

Answer: contains various data about an exception; created when an exception is thrown.

Else suite

Answer: block of statements executed after statements in try suite, only if no exceptions were raised

Question 81.

finally suite

Answer: block of statements after the finally clause. Always executed after the try suite has executed, and after any exception handlers have executed. Executes whether an exception occurs or not.