Docsity

Python Computer Science Exam Questions with Correc, Exams of Nursing

Toggle sidebar
bg1
Python Computer Science Exam
Questions with Correct Answers
*A ____ is a set of instructions that a computer follows to perform a task -
ANSWERSProgram
The physical devices that a computer is made of are referred to as ______ -
ANSWERSHardware
*The part of a program that runs the programs is called the ____ - ANSWERSCPU
Today, CPU's are small chips known as _______ - ANSWERSMicroprocessors
The computer stores a program while the program is running, as well as the data that
the program is working with, in ____ - ANSWERSMain memory
*_____ is a volatile type of memory that is used only for temporary storage while a
program is running - ANSWERSRAM
A type of memory that can hold data for long periods of time, even when there is no
power to the computer is called _______ - ANSWERSSecondary Storage
A component that collects data from people or other devices and sends it to the
computer is called ______ - ANSWERSan input device
A video display is an _______ device - ANSWERSOutput
A ____ is enough memory to store a letter of the alphabet or a small number -
ANSWERSbyte
*A byte is made up of 9 ____ - ANSWERSbits
*Numeric values are written in a sequence of 1's and 0's in the ____ numbering system
- ANSWERSbinary
*A bit that is turned off represents the value of ____ - ANSWERS0
*A set of 128 numeric codes that represent the English letters, various punctuation
marks, and other characters is _____ - ANSWERSASCII
*An extensive encoding system scheme that can represent characters for many
languages in the world is ___ - ANSWERSUnicode
pf3
pf4
pf5
pf8

Partial preview of the text

Download Python Computer Science Exam Questions with Correc and more Exams Nursing in PDF only on Docsity!

Python Computer Science Exam

Questions with Correct Answers

*A ____ is a set of instructions that a computer follows to perform a task - ANSWERSProgram The physical devices that a computer is made of are referred to as ______ - ANSWERSHardware *The part of a program that runs the programs is called the ____ - ANSWERSCPU Today, CPU's are small chips known as _______ - ANSWERSMicroprocessors The computer stores a program while the program is running, as well as the data that the program is working with, in ____ - ANSWERSMain memory *_____ is a volatile type of memory that is used only for temporary storage while a program is running - ANSWERSRAM A type of memory that can hold data for long periods of time, even when there is no power to the computer is called _______ - ANSWERSSecondary Storage A component that collects data from people or other devices and sends it to the computer is called ______ - ANSWERSan input device A video display is an _______ device - ANSWERSOutput A ____ is enough memory to store a letter of the alphabet or a small number - ANSWERSbyte *A byte is made up of 9 ____ - ANSWERSbits *Numeric values are written in a sequence of 1's and 0's in the ____ numbering system

  • ANSWERSbinary *A bit that is turned off represents the value of ____ - ANSWERS *A set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters is _____ - ANSWERSASCII *An extensive encoding system scheme that can represent characters for many languages in the world is ___ - ANSWERSUnicode

Negative numbers are encoded using the ______ technique - ANSWERSTwo's Complement Real numbers are encoded using the _____ technique - ANSWERSFloating Point *The tiny dots of color that digital images are composed of are ________ - ANSWERSPixels If you were to look at a machine language program, you would see __________ - ANSWERSa stream of binary numbers In the ______ part of the fetch_decode-execute cycle, the CPU determines which operation it should perform - ANSWERSDecode Computers only execute programs that are written in _________ - ANSWERSMachine language *The ________ translates an assembly language program to a machine language program - ANSWERSAssembler *The words that make up a high-level programming language are called _______ - ANSWERSKey Words *The rules that must be followed when writing a program are called ______ - ANSWERSSyntax *A _______ program translates a high-level language program into a machine language program - ANSWERSCompiler *A ___ error does not prevent the program from running, but causes it to produce incorrect results - ANSWERSLogic A _____ is a single function that the program must perform in order to satisfy the customer - ANSWERSSoftware Requirement *A ______ is a set of well defined logical steps that must be taken to perform a task - ANSWERSAlgorithm An informal language that has no syntax rules and is not meant to be compiled or executed is called _______ - ANSWERSPsuedocode *A _____ is a diagram that graphically depicts the steps that take place in a program - ANSWERSFlowchart

*A compound Boolean structure created with the ___ operator is true either of its sub- expressions is true - ANSWERSOr The ________ operator takes a Boolean expression as its operand and reverses its logical value - ANSWERSNot (!=) *In Python, _____ determines which lines of code are included in a block - ANSWERSindent *A ________ controlled loop uses a T/F condition to control the number of times that it repeats - ANSWERSCondition *A _______ controlled loop repeats a specific number of times - ANSWERSCount Each repetition loop is known as an ______ - ANSWERSiteration The while loop is a _____ type of loop - ANSWERSpretest *An _______ loop has no way of ending and repeats until the program is interrupted - ANSWERSinfinite *An _______ variable keeps a running total - ANSWERSAccumulator *A ______ is a special value that signals when there are no more items to be processed

  • ANSWERSSentinel The input operation that appears just before a validation loop is known as the ______ - ANSWERSPriming Read Validation loops are also known as - ANSWERSerror traps A group of statements that exist within a program for the purpose of performing a specific task is a _____ - ANSWERSFunction *A design technique that helps to reduce the duplication of code within a program and is a benefit of using functions is ______ - ANSWERSCode reuse The first line of a function definition is known as the ____ - ANSWERSHeader *You ______ a function to execute it - ANSWERSCall A design technique that programmers use to break down an algorithm into functions is known as ______ - ANSWERSTop-down design

A ______ is a diagram that gives visual representation of the relationships between functions - ANSWERShierarchy chart *A ________ is a variable that is created inside a function - ANSWERSlocal A _____ is the part of a program in which a variable may be accessed - ANSWERSScope **A_____ is a piece of data that is sent into a function - ANSWERSArgument **A _____ is a special variable that receives a piece of data when a function is called - ANSWERSParameter *A variable that is visible to every function in a program file is _______ - ANSWERSGlobal variable *This is a prewritten function that is built into a programming language - ANSWERSLibrary *This statement causes a function to end and sends a value back to the part of the program that called the function - ANSWERSReturn *An _____ chart is a design tool that describes the input, processing, and output of a function - ANSWERSIPO *You must have an _____ statement in your program in order to use the functions in the math module - ANSWERSImport The data that is written to is known as an _____ - ANSWERSOutput file Before a file can be used by a program, it must be _____ - ANSWERSOpened This type of file contains data that has not been converted to text - ANSWERSBinary When working with this type of file, you access its data from the beginning of the file to the end of the file - ANSWERSSequential Acces When working with this type of file, you can jump directly to any piece of data in the file without reading the data that comes before it - ANSWERSDirect Access This is a small "holding section" in a memory that many systems write data to before writing data to a file - ANSWERSBuffer This marks the location of the next item that will be read from a file - ANSWERSRead position

*This operator determines where one string is contained inside another string - ANSWERSIn *This string method returns true if a string contains only alphabetical characters and is at least one character in length - ANSWERSisalpha() *This method returns true if a string contains only numeric digits and is at least one character in length - ANSWERSisdigit() This string returns a copy of the string with all leading and trailing whitespace characters removed - ANSWERSstrip *You can use ___ operator to determine whether a key exists in a dictionary - ANSWERSIn *________ method returns a randomly selected key-value pair from the dictionary - ANSWERSpopitem() *________ method returns the value associated with a specified key and removes that key-value pair from the dictionary - ANSWERSpop() *______ dictionary method returns the value associated with a specified key - ANSWERSget() ______ method returns all of dictionary's keys and their associated values as a sequence of tuples - ANSWERSitems() Can add an element to a set with this method - ANSWERSadd *You can add a group of elements to a set with a mehtod - ANSWERSUpdate *This set method removes an element but does not raise an exception if the element isnt found - ANSWERSDiscard *The ____ set method removes an element and raises an exception if the element isnt found - ANSWERSRemove *The _____ list method returns the number of times a specific value occurs in a list - ANSWERScount The_____ programming practice is centered on creating functions that are separate from the data that they work on - ANSWERSProcedural

The ___ programming practice is centered on creating objects - ANSWERSobject- oriented A _____ is a component of a class that references data - ANSWERSdata attribution An object is an _____ - ANSWERSInstance An ________ method gets the value of a data attribute but does not change it - ANSWERSaccessor A ______ method stores a value in a data attribute or changes its value in some other way - ANSWERSmutator The ____ method is automatically called when an object is created - ANSWERS__init___ A set of standard diagrams for graphically depicting object-oriented systems is provided by ____ - ANSWERSa UML In one approach to identifying the classes in a problem, the programmer identifies the _____ in a description of the problem domain - ANSWERSnouns In ones approach to identifying a class's data attributes and methods, the programmer identifies the class's _________ - ANSWERSResponsibilites