1 Introduction To Computers And Programming 2 Input, Processing, And Output 3 Decision Structures And Boolean Logic 4 Repetition Structures 5 Functions 6 Files And Exceptions 7 Lists And Tuples 8 More About Strings 9 Dictionaries And Sets 10 Classes And Object-oriented Programming 11 Inheritance 12 Recursion 13 Gui Programming expand_more
2.1 Designing A Program 2.2 Input, Processing, And Output 2.3 Displaying Output With The Print Function 2.4 Comments 2.5 Variables 2.6 Reading Input From The Keyboard 2.7 Performing Calculations 2.8 More About Data Output 2.9 Named Constants 2.10 Introduction To Turtle Graphics Chapter Questions expand_more
Problem 1MC: A ______ error does not prevent the program from running, but causes it to produce incorrect... Problem 2MC Problem 3MC: A(n) __________ is a set of well-defined logical steps that must be taken to perform a task. a.... Problem 4MC: An Informal language that has no syntax rules and is not meant to be compiled or executed is called... Problem 5MC: A _______ is a diagram that graphically depicts the steps that take place in a program. a. flowchart... Problem 6MC: A ______ is a sequence of characters. a. char sequence b. character collection c. string d. text... Problem 7MC Problem 8MC Problem 9MC: A string literal in Python must be enclosed in __________. a. parentheses. b. single-quotes. c.... Problem 10MC Problem 11MC: A(n) __________ makes a variable reference a value in the computer's memory. a variable declaration... Problem 12MC: This symbol marks the beginning of a comment in Python. a. b. c. d. # Problem 13MC: Which of the following statements will cause an error? a. x = 17 b. 17 = x c. x = 99999 d. x = '17' Problem 14MC: In the expression 12 + 7, the values on the right and left of the + symbol are called __________. a.... Problem 15MC: This operator performs integer division. a. // b. % c. d. / Problem 16MC: This is an operator that raises a number to a power. a. % b. c. d. / Problem 17MC: This operator performs division, but instead of returning the quotient it returns the remainder. a.... Problem 18MC Problem 19MC: Which built-in function can be used to read input that has been typed on the keyboard? a. input ()... Problem 20MC Problem 21MC: A magic number is _______. a. a number that is mathematically undefined b. an unexplained value that... Problem 22MC: A _______ is a name that represents a value that does not change during the program's execution. a.... Problem 1TF: Programmers must be careful not to make syntax errors when writing pseudocode programs. Problem 2TF: In a math expression, multiplication and division take place before addition and subtraction. Problem 3TF: Variable names can have spaces in them. Problem 4TF: In Python, the first character of a variable name cannot be a number. Problem 5TF: If you print a variable that has not been assigned a value, the number 0 will be displayed. Problem 1SA: What does a professional programmer usually do first to gain an understanding of a problem? Problem 2SA: What is pseudocode? Problem 3SA: Computer programs typically perform what three steps? Problem 4SA: If a math expression adds a float to an int, what will the data type of the result be? Problem 5SA: What is the difference between floating-point division and integer division? Problem 6SA: What is a magic number? Why are magic numbers problematic? Problem 7SA: Assume a program uses the named constant PI to represent the value 3.14159. The program uses the... Problem 1AW: Write Python code that prompts the user to enter his or her height and assigns the user's input to a... Problem 2AW: Write Python code that prompts the user to enter his or her favorite color and assigns the users... Problem 3AW: Write assignment statements that perform the following operations with the variables a, b, and c: a.... Problem 4AW: Assume the variables result, w, x, y, and z are all integers, and that w = 5, x = 4, y = 8, and z =... Problem 5AW: Write a Python statement that assigns the sum of 10 and 14 to the variable total. Problem 6AW: Write a Python statement that subtracts the variable down_payment from the variable total and... Problem 7AW: Write a Python statement that multiplies the variable subtotal by 0.15 and assigns the result to the... Problem 8AW Problem 9AW: What would the following display? num = 99 num = 5 print (num) Problem 10AW: Assume the variable sales references a float value. Write a statement that displays the value... Problem 11AW: Assume the following statement has been executed: number = 1234567.456 Write a Python statement that... Problem 12AW: What will the following statement display? print(George, John, Paul, Ringo, sep='@') Problem 13AW: Write a turtle graphics statement that draws a circle with a radius of 75 pixels. Problem 14AW: Write the turtle graphics statements to draw a square that is 100 pixels wide on each side and... Problem 15AW: Write the turtle graphics statements to draw a square that is 100 pixels wide on each side and a... Problem 1PE: Personal Information Write a program that displays the following information: Your name Your... Problem 2PE: Sales Prediction A company has determined that its annual profit is typically 23 percent of total... Problem 3PE: Land Calculation One acre of land is equivalent to 43,560 square feet. Write a program that asks the... Problem 4PE: Total Purchase A customer in a store is purchasing five items. Write a program that asks for the... Problem 5PE: Distance Traveled Assuming there are no accidents or delays, the distance that a car travels down... Problem 6PE: Sales Tax Write a program that will ask the user to enter the amount of a purchase. The program... Problem 7PE: Miles-per-Gallon A car's miles-per-gallon (MPG) can be calculated with the following formula: MPG =... Problem 8PE: Tip, Tax, and Total Write a program that calculates the total amount of a meal purchased at a... Problem 9PE: Celsius to Fahrenheit Temperature Converter Write a program that converts Celsius temperatures to... Problem 10PE: Ingredient Adjuster A cookie recipe calls for the following ingredients: 1.5 cups of sugar 1 cup... Problem 11PE: Male and Female Percentages Write a program that asks the user for the number of males and the... Problem 12PE: Stock Transaction Program Last month, Joe purchased some stock in Acme Software. Inc. Here are the... Problem 13PE: Planting Grapevines A vineyard owner is planting several new rows of grapevines, and needs to know... Problem 14PE: Compound Interest When a bank account pays compound interest, it pays interest not only on the... Problem 15PE: Turtle Graphics Drawings Use the turtle graphics library to write programs that reproduce each of... format_list_bulleted