Docsity

Starting Out with Python 6 Learning Workbook Python Basics Exam 2026: 81 Questions and Ans, Exams of Nursing

Toggle sidebar
bg1
Question 1.
The physical devices, or components, of which a computer is made of are referred to as
_____?
Correct Answer: Hardware
Question 2.
List the five major components of a computer system.
Correct Answer: The CPU, main memory, secondary storage devices, input
devices, and output devices.
Question 3.
What part of the computer actually runs programs?
Correct 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?
Correct 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?
Correct 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?
Correct Answer: Output devices
Question 7.
What fundamental set of programs control the internal operations of the computer's
hardware?
Correct Answer: Operating Systems
Starting Out with Python 6 Learning Workbook Python Basics
Exam 2026: 81 Questions and Answers
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Starting Out with Python 6 Learning Workbook Python Basics Exam 2026: 81 Questions and Ans and more Exams Nursing in PDF only on Docsity!

Question 1. The physical devices, or components, of which a computer is made of are referred to as _____? Correct Answer: Hardware

Question 2. List the five major components of a computer system. Correct Answer: The CPU, main memory, secondary storage devices, input devices, and output devices.

Question 3. What part of the computer actually runs programs? Correct 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? Correct 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? Correct 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? Correct Answer: Output devices

Question 7. What fundamental set of programs control the internal operations of the computer's hardware? Correct Answer: Operating Systems

Starting Out with Python 6 Learning Workbook Python Basics

Exam 2026: 81 Questions and Answers

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?

Correct Answer: Utility Programs

Question 9.

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

Correct Answer: Application Software

Question 10.

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

Correct Answer: Microprocessors

Question 11.

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

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

Correct Answer: Secondary Storage

Question 13.

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

Correct Answer: An input device

Question 14.

A video display is a(n) __________ device.

Correct Answer: output

function definition

Correct Answer: the code for a function; specifies what a function does

Question 23.

function header

Correct Answer: the first line in a function that begins with the key word def; marks the beginning of the function definition

Question 24.

block

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

Question 25.

mainline logic

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

Question 26.

main function

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

Question 27.

top down design

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

Question 28.

hierarchy charts

Correct Answer: shows boxes that represent each function in a program

local variable

Correct 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

Correct 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

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

Question 32.

parameter

Correct 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

Correct 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

Correct 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

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

library function

Correct Answer: a pre-written function that is built into a programming language

Question 44.

randrange function

Correct Answer: similar to range function; returns a randomly selected value from a sequence of values; ex number = random.randomrange(10)

Question 45.

random function

Correct Answer: returns a random floating point number in the range of 0.0 up to (but not including) 1.0 ex number = random.random( )

Question 46.

uniform function

Correct Answer: returns a random floating point number but allows you to specify the range of values to select from; ex: number = random.uniform(1.0, 10,0)

Question 47.

psuedorandom numbers

Correct 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

Correct 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

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

IPO chart

Correct 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

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

Question 52.

module

Correct 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

Correct Answer: A file that data is written to.

Question 54.

Input file

Correct Answer: A file that data is read from.

Question 55.

Opened

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

Question 56.

Closed

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

Field

Correct Answer: This is a single piece of data within a record.

Question 65.

Raised

Correct Answer: This occurs when an exception is generated.

Question 66.

Exception handler

Correct Answer: This is a section of code that gracefully responds to exceptions.

Question 67.

Try/except

Correct Answer: You write this statement to respond to exceptions.

Question 68.

cookie

Correct Answer: A small web page file stored on your computer

Question 69.

filename extensionos

Correct Answer: short sequences of characters that appear at the end of a filename preceded by a period

Question 70.

file object

Correct Answer: an object that is associated with a specific file and provides a way for the program to work with that file.

Raw string

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

Question 72.

Method

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

Question 73.

rstrip

Correct Answer: removes specific characters from the end of a string

Question 74.

str

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

Question 75.

record

Correct Answer: complete set of data that describes one item

Question 76.

traceback

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

Question 77.

exception

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