Question 1
3 out of 3 points

The ______________ coding scheme is a worldwide standard for representing the characters of many of the world's languages. Answer Selected Answer: Unicode Correct Answer: Unicode

Question 2
3 out of 3 points

Which computer language uses short words known as mnemonics for writing programs? Answer Selected Answer: Assembly Correct Answer: Assembly

Question 3
3 out of 3 points

Which of the following is not an example of operating system software? Answer Selected Answer: Microsoft Word Correct Answer: Microsoft Word

Question 4
3 out of 3 points

Programs that make a computer useful for everyday tasks are known as ___________. Answer Selected Answer:

Application Software Correct Answer: Application Software  Question 5 3 out of 3 points What is the encoding technique called that is used to store negative numbers in the computer’s memory? Answer Selected Answer: Twos complement Correct Answer: Twos complement  Question 6 3 out of 3 points The following is an example of an instruction written in which computer language? 10100001 Answer Selected Answer: Machine language Correct Answer: Machine language  Question 7 3 out of 3 points A(n) ___________ is a set of instructions that a computer follows to perform a task. Answer Selected Answer: program Correct Answer: program .

Answer Selected Answer: 13 . Answer Selected Answer: floating point Correct Answer: floating point  Question 10 3 out of 3 points What is the largest value that can be stored in one byte? Answer Selected Answer: 255 Correct Answer: 255  Question 11 3 out of 3 points Use what you've learned about the binary numbering system in this chapter to convert the binary number (1101) to decimal. Question 8 3 out of 3 points The process known as the ___________ cycle is used by the CPU to execute instructions in a program. Answer Selected Answer: Fetch-decode-execute Correct Answer: Fetch-decode-execute  Question 9 3 out of 3 points Real numbers are encoded using the ________ technique.

May 27. the computer stores the program as well as the data that the program is working with in what part of the computer? Answer Selected Answer: main memory Correct Answer: main memory Sunday.Correct Answer: 13  Question 12 3 out of 3 points While a program is running. 2012 2:41:52 PM EDT  Question 1 2 out of 2 points Which of the following is not a variable data type in Python? Answer Selected Answer: Number Correct Answer: Number  Question 2 2 out of 2 points What type of symbol can be used in Python to mark the beginning and end of a string? Answer Selected Answer: Quotation Correct Answer: Quotation  Question 3 0 out of 2 points .

Answer Selected Answer: Correct Answer: True True  Question 6 2 out of 2 points In the Total of items in a shopping cart project.In the Celsius to Fahrenheit Temperature Converter project. 1.0 / 5.0 * celsius + 32  Question 4 2 out of 2 points True/False: The expressions (a + b) / c and a + b / c will always yield identical results. Answer Selected Answer: Correct Answer: False False  Question 5 2 out of 2 points True/False: In most computer languages. 2. the first character of a variable name cannot be a numeric digit (that is. what is the correct method to compute the equivalent fahrenheit temperature? Assume that the variable celsius contains the original input temperature in degrees Celsius. what is the correct method to compute the sales tax? Assume that the variable subtotal contains the correct sum for the five purchased items. Answer Selected Answer: # Compute the equivalent temperature in Fahrenheit fahrenheit = 1. … 9). 0. Answer Selected Answer: .8 celsius + 32 Correct Answer: # Compute the equivalent temperature in Fahrenheit fahrenheit = 9.

06 tax = subtotal * SALES_TAX_RATE  Question 7 2 out of 2 points The value of the expression 12 – 4 * 3 / 2 + 9 is _________. Answer Selected Answer: 15 Correct Answer: 15  Question 8 2 out of 2 points 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? Answer Selected Answer: Pseudocode Correct Answer: Pseudocode  Question 9 2 out of 2 points The following is an example of what type of statement: Set rate = 5.06 tax = subtotal * SALES_TAX_RATE Correct Answer: # compute the sales tax SALES_TAX_RATE = 0.# compute the sales tax SALES_TAX_RATE = 0.75 Answer Selected Answer: .

Answer Selected Answer: Value Correct Answer: Value  Question 3 2 out of 2 points .Assignment Correct Answer: Assignment  Question 10 2 out of 2 points A(n) _______________ variable is one that has been declared. but has not been initialized or assigned a value. Answer Selected Answer: uninitialized Correct Answer: uninitialized  Question 1 2 out of 2 points What is the term used for the variable that receives an argument that passed into a module? Answer Selected Answer: Parameter Correct Answer: Parameter  Question 2 2 out of 2 points Passing an argument by ________ means that only a copy of the argument's value is passed into the parameter variable.

Answer Selected Answer: def showPaintingEstimate(wall_area.0 ) Answer Selected Answer: Call (or execution) Correct Answer: Call (or execution)  Question 5 2 out of 2 points Function is another name for _____________. showSalesTaxDue( 110932. paint_cost_per_gallon):  Question 4 2 out of 2 points The following is an example from Python of a module _________________. identify an acceptable header for the definition of a Python module used to compute and show the estimate of the painting work.In the Paint Job Estimator project. Answer Selected Answer: Module Correct Answer: Module  Question 6 2 out of 2 points In the Monthly Sales Tax project. identify acceptable Python . paint_cost_per_gallon): Correct Answer: def showPaintingEstimate(wall_area.

gov/healthyweight/assessing/bmi/adult_bm i/index.cdc.html # Parameters: # weight is in lbs # height_ft is the WHOLE part of height in feet # height_in is the FRACTIONAL part of height in remaining inches # def showBodyMassIndex(weight. height_in): # define named constants used by the BMI calculation BMI_EN = 703. # define a function to compute and display Body Mass Index # citation: # http://www.0 # needed to convert from English units to metric INCHES_PER_FOOT = 12. 25000): ") showSalesTaxReport(sales) Correct Answer: sales = input("Please enter the monthly sales (eg. height_ft.gov/healthyweight/assessing/bmi/adult_bmi/index.gov web page http://www.0 . Answer Selected Answer: sales = input("Please enter the monthly sales (eg. 25000): ") showSalesTaxReport(sales)  Question 7 2 out of 2 points According to the BMI information at the cdc.code that interactively inputs the monthly sales and passes it as an argument by calling a "sales tax" module. Choose the Python code at the COMPLETE THE COMPUTATION comment below that gets this correct.html the BMI is calculated by dividing weight in pounds by height in inches squared and multiplying by a conversion factor of 703.cdc.

# COMPLETE THE COMPUTATION Answer Selected Answer: # COMPLETE THE COMPUTATION height = height_ft * INCHES_PER_FOOT + height_in bmi = weight * BMI_EN / (height * height) Correct Answer: # COMPLETE THE COMPUTATION height = height_ft * INCHES_PER_FOOT + height_in bmi = weight * BMI_EN / (height * height)  Question 8 2 out of 2 points A pass by _________ argument means that the argument is passed into a parameter that will reference (as an alias) the content of the argument in the module. Answer Selected Answer: Reference Correct Answer: Reference  Question 9 2 out of 2 points Which type of variable is not recommended to be used in programs because they make programs hard to understand and debug? Answer Selected Answer: Global Correct Answer: Global  Question 10 2 out of 2 points .

equality. greater than. etc.) Answer Selected Answer: Relational Correct Answer: Relational  Question 2 2 out of 2 points Which operator is best to determine whether a variable x contains a value in the range of 10 through 57? Answer Selected Answer: and Correct Answer: and  Question 3 0 out of 2 points In the Color Mixer project. Answer . 2012 2:21:52 AM EDT  What type of operator is used in Python to determine whether a specific relationship exists between two values? (for example. Of the following Python code fragments. then the program should display an error message.Which type of variable is visible to every module and the entire program? Answer Selected Answer: Global Correct Answer: Global Saturday. identify the correct implementation to detect an invalid color input. if the user enters anything other than a primary color (for example. the color purple). June 23. less than.

red. blue or yellow): ") # check that c1 is a primary color. identify acceptable Python code to handle the third row of the shipping charges table. but".70 Over 10 pounds $3. c1. display an error msg if not( c1 == "red" or c1 == "blue" or c1 == "yellow" ): print "Sorry." Correct Answer: c1 = raw_input("Enter a primary color (eg. c1. display an error msg if not( c1 == red or c1 == blue or c1 == yellow ): print "Sorry. "is not a primary color. but not more than 10 pounds $3. red. blue or yellow): ") # check that c1 is a primary color.Selected Answer: c1 = raw_input("Enter a primary color (eg.80 Answer . but"."  Question 4 2 out of 2 points Which of the following is a logical (boolean) operator in Python? Answer Selected Answer: and Correct Answer: and  Question 5 2 out of 2 points In the Shipping Charges project. "is not a primary color. shown here: Weight of Package Rate per Pound 2 pounds or less $1. and if not.20 Over 6 pounds.10 Over 2 pounds. and if not. but not more than 6 pounds $2.

. states that a sedentary person's weight is considered to be optimal if his or her BMI is between 18. the person is considered to be underweight. Answer Selected Answer: or Correct Answer: not  Question 8 2 out of 2 points Problem #10 (page 161).5 and 25.7  Question 6 2 out of 2 points Which operator is used in Python to determine that the operands are not of the same exact value? Answer Selected Answer: != Correct Answer: !=  Question 7 0 out of 2 points The _________ operator in Python is a unary operator as it works with only one operand. the enhanced Body Mass Index (BMI) program.7 Correct Answer: elif weight > 6 and weight <= 10: rate_per_lb = 3. If the BMI is less than 18.5.Selected Answer: elif weight > 6 and weight <= 10: rate_per_lb = 3.

if (bmi < 18.If the BMI value is greater than 25.5): print "underweight."  Question 9 2 out of 2 points What type of operators are the following in Python? > Answer Selected Answer: Relational Correct Answer: Relational  < >= <= == != Question 10 2 out of 2 points In the Python example program paycheck_with_if.py." Correct Answer: # display the proper message based on the BMI print "BMI interpretation: "." else: print "overweight. Conditional logic code using if else . the person is considered to be overweight. if (bmi < 18." elif (bmi <= 25): print "optimal." elif (bmi <= 25): print "optimal.5): print "underweight." else: print "overweight. the paycheck is computed using an if else statement. Identify the correct Python code fragment for the interpretation of the BMI value: Answer Selected Answer: # display the proper message based on the BMI print "BMI interpretation: ".

statements can be replaced with a single if statement. change the computed paycheck. Which of the following Python code fragments is a correct implementation of this coding strategy: Answer Selected Answer: # ------. assuming no overtime work paycheck = wage * hours if hours > 40: # overtime paycheck calculation."act first.5 print "Overtime added" Correct Answer: # ------.0 * wage + (hours . assuming no overtime work paycheck = wage * hours if hours > 40: # overtime paycheck calculation.40) * wage * 1. assumming time-and-a-half for over # 40 hours of labor paycheck = 40. check later": an if else replacement ----------# compute the paycheck. and then to check the overtime assumption and. Here that can be applied by first computing the paycheck while assuming either overtime (or no overtime). check later": an if else replacement ----------# compute the paycheck. using a strategy sometimes called act first."act first. check later.40) * wage * 1.5 print "Overtime added" Instructions false  Question 1 2 out of 2 points What is the term used for the variable that is defined in the header of a module DEFINITION and that receives a value from a module call? .0 * wage + (hours . if necessary. assumming time-and-a-half for over # 40 hours of labor paycheck = 40.

75 Answer Selected Answer: Assignment Correct Answer: Assignment  Question 3 2 out of 2 points The following is an example of an instruction written in which computer language? 10110000 Answer Selected Answer: Machine language Correct Answer: Machine language  Question 4 2 out of 2 points Programs that make a computer useful for everyday tasks are known as ___________.Answer Selected Answer: Parameter Correct Answer: Parameter  Question 2 2 out of 2 points In pseudocode. the following is an example of what type of statement: Set rate = 5. Answer Selected Answer: Application Software .

"has area of". check later. a good statement to use for writing the letter grade example from your textbook on page 141. identify the Python code fragment that correctly implements an Act first. area  Question 6 2 out of 2 points In Python. is: Answer Selected Answer: if elif . check later strategy to compute the area of a geometric figure.5 * height * base print figure. and that the dimensions of the figure are stored in the variables height and base. "has area of". Program 4-7. page 160). Assume that the variable figure is either the string "rectangle" or the string "triangle".Correct Answer: Application Software  Question 5 2 out of 2 points First of all. area Correct Answer: # assume that the figure is a rectangle area = height * base if (figure == "triangle"): area = 0. In the following. Answer Selected Answer: # assume that the figure is a rectangle area = height * base if (figure == "triangle"): area = 0. re-download the chapter ZIP notes for chapter 4. The code shows that it's possible to write selection logic for a true/false alternative with either a simple if else statement or by using a programming strategy that I refer to as Act first.5 * height * base print figure. Examine the solution to the Magic Dates project (#4.

 Question 8 2 out of 2 points In a module call. so it cannot be used as shown in the showSalesTaxReport() module. there is a variable scope mistake that prevents the sales tax calculations from being done. Correct Answer: The variable sales is local in scope to the main() module. What is the mistake? def showSalesTaxReport(monthly_sales): # define named constants used by the tax calculation COUNTY_TAX_RATE = 0. passing an argument by ________ means that only a COPY of .04 # do the computations county_sales_tax = COUNTY_TAX_RATE * sales state_sales_tax = STATE_TAX_RATE * sales total_sales_tax = county_sales_tax + state_sales_tax # display the results # define the main function showing the use of the showPropertyTax function def main(): sales = input("Please enter the monthly sales (eg. so it cannot be used as shown in the showSalesTaxReport() module.02 STATE_TAX_RATE = 0.Correct Answer: if elif  Question 7 2 out of 2 points In the following partial Python program. 25000): ") showSalesTaxReport(sales) Answer Selected Answer: The variable sales is local in scope to the main() module.

the argument's value is passed into the parameter variable. Answer Selected Answer: Value Correct Answer: Value  Question 9 2 out of 2 points What category of programming statements can be considered a logical design that controls the order in which a set of statements executes? Answer Selected Answer: Decision Correct Answer: Decision  Question 10 2 out of 2 points Which error produces incorrect results but does not prevent the program from running? Answer Selected Answer: logic Correct Answer: logic .

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.