Starting Out with Python (3rd Edition)
3rd Edition
ISBN: 9780133582734
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 2, Problem 2AW
Write Python code that prompts the user to enter his or her favorite color and assigns the user’s input to a variable named color.
Expert Solution & Answer
Learn your wayIncludes step-by-step video
schedule02:00
Students have asked these similar questions
Easy Pyhthon Program Please Answer Fast:
Subject: Python Programming
Need help with a python program
When prompting the user you must always include text which lets the user know what should be inputted.
Write a python program that prompts the user to enter a loan amount (float), payment amount (float), and interest rate (float) and displays the number of payments required until the loan is paid. Interest is added to current balance before a payment is applied. Ex: If current balance is $100.00 and the interest rate is 0.02, the new balance is $102.00 before a payment is applied. HINT: Use a while loop to pay the loan down.
Chapter 2 Solutions
Starting Out with Python (3rd Edition)
Ch. 2.1 - Who is a programmers customer?Ch. 2.1 - What is a software requirement?Ch. 2.1 - What is an algorithm?Ch. 2.1 - What is pseudocode?Ch. 2.1 - Prob. 5CPCh. 2.1 - Prob. 6CPCh. 2.3 - Write a statement that displays your name.Ch. 2.3 - Write a statement that displays the following...Ch. 2.3 - Write a statement that displays the following...Ch. 2.5 - Prob. 10CP
Ch. 2.5 - Which of the following are illegal variable names...Ch. 2.5 - Prob. 12CPCh. 2.5 - Is the following assignment statement valid or...Ch. 2.5 - Prob. 14CPCh. 2.5 - Look at the following assignment statements:...Ch. 2.5 - What will be displayed by the following program?...Ch. 2.6 - You need the user of a program to enter a...Ch. 2.6 - Prob. 18CPCh. 2.7 - Prob. 19CPCh. 2.7 - Prob. 20CPCh. 2.7 - Prob. 21CPCh. 2 - A ______ error does not prevent the program from...Ch. 2 - Prob. 2MCCh. 2 - A(n) __________ is a set of well-defined logical...Ch. 2 - An Informal language that has no syntax rules and...Ch. 2 - A _______ is a diagram that graphically depicts...Ch. 2 - A ______ is a sequence of characters. a. char...Ch. 2 - Prob. 7MCCh. 2 - Prob. 8MCCh. 2 - A string literal in Python must be enclosed in...Ch. 2 - Prob. 10MCCh. 2 - A(n) __________ makes a variable reference a value...Ch. 2 - This symbol marks the beginning of a comment in...Ch. 2 - Which of the following statements will cause an...Ch. 2 - In the expression 12 + 7, the values on the right...Ch. 2 - This operator performs integer division. a. // b....Ch. 2 - This is an operator that raises a number to a...Ch. 2 - This operator performs division, but instead of...Ch. 2 - Prob. 18MCCh. 2 - Which built-in function can be used to read input...Ch. 2 - Prob. 20MCCh. 2 - Programmers must be careful not to make syntax...Ch. 2 - In a math expression, multiplication and division...Ch. 2 - Variable names can have spaces in them.Ch. 2 - In Python, the first character of a variable name...Ch. 2 - If you print a variable that has not been assigned...Ch. 2 - What does a professional programmer usually do...Ch. 2 - What is pseudocode?Ch. 2 - Computer programs typically perform what three...Ch. 2 - If a math expression adds a float to an int, what...Ch. 2 - What is the difference between floating-point...Ch. 2 - Write Python code that prompts the user to enter...Ch. 2 - Write Python code that prompts the user to enter...Ch. 2 - Write assignment statements that perform the...Ch. 2 - Assume the variables result, w, x, y, and z are...Ch. 2 - Write a Python statement that assigns the sum of...Ch. 2 - Write a Python statement that subtracts the...Ch. 2 - Write a Python statement that multiplies the...Ch. 2 - Prob. 8AWCh. 2 - What would the following display? num = 99 num = 5...Ch. 2 - Assume the variable sales references a float...Ch. 2 - Assume the following statement has been executed:...Ch. 2 - What will the following statement display?...Ch. 2 - Personal Information Write a program that displays...Ch. 2 - Sales Prediction A company has determined that its...Ch. 2 - Land Calculation One acre of land is equivalent to...Ch. 2 - Total Purchase A customer in a store is purchasing...Ch. 2 - Distance Traveled Assuming there are no accidents...Ch. 2 - Sales Tax Write a program that will ask the user...Ch. 2 - Miles-per-Gallon A car's miles-per-gallon (MPG)...Ch. 2 - Tip, Tax, and Total Write a program that...Ch. 2 - Celsius to Fahrenheit Temperature Converter Write...Ch. 2 - Ingredient Adjuster A cookie recipe calls for the...Ch. 2 - Male and Female Percentages Write a program that...Ch. 2 - Stock Transaction Program Last month, Joe...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
(Sum a Sequence of Integers) Write a program that sums a sequence of integers. Assume that the first integer re...
C How to Program (8th Edition)
Write a function with the following prototype: / Determine whether arguments can be subtracted without overflow...
Computer Systems: A Programmer's Perspective (3rd Edition)
3.12 (Date Create a class called Date that includes three pieces Of information as data
members—a month (type ...
C++ How to Program (10th Edition)
Why should you indent the statements in the body of a loop?
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
(Asterisked problems are associated with optional sections.) 20. Suppose you were given two stacks. If you were...
Computer Science: An Overview (12th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- In Python the first character of a variable name cannot be a number.True or Falsearrow_forwardPython Programing Only (PLEASE INCLUDE INPUT VALIDATION IF NEEDED) A retail company must file a monthly sales tax report listing the total sales for the month,and the amount of state and county sales tax collected. The state sales tax rate is 5 percentand the county sales tax rate is 2.5 percent. Write a program that asks the user to enterthe total sales for the month. From this figure, the application should calculate and displaythe following:• The amount of county sales tax• The amount of state sales tax• The total sales tax (county plus state)arrow_forwardMalcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile. Write a program named MoveEstimator that prompts a user for and accepts estimates for the number of hours for a job and the number of miles involved in the move and displays the total moving fee.arrow_forward
- function is used to display anything on the screen in Python Programming Language.arrow_forwardPython please: Write a program that prints a formatted "Store Hours" sign as shown below. Note that the first line has three leading spaces. Store Hours Mon-Fri: 10:00am - 6:00pm Saturday: 10:00am - 5:00pm Sunday: 1:00pm - 5:00pmarrow_forwardCreate a program in pythonthat asks the user to input a number between 20 and 99. The program must then print out the number in English words. If the user does not enter a value between 20 and 99 display an error message stating that the input is not within a valid range.arrow_forward
- voting.py Write a Python program that takes as input the user age. if the person's age is less than 18 the program should display "You are too young to vote" Otherwise the program should proceed by asking if the person did register to vote or not. If No the program should display:" You need to register before you can vote" if Yes the program should display: " You can vote"arrow_forwardIn a program, a may fill several consecutive lines. block comment b. square comment c. multiline comment d. machine comment a. block comment b. square comment c. multiline comment d. machine commentarrow_forwardWarning ⚠️ don't use AI otherwise I'll report your accountarrow_forward
- Python Programming onlyarrow_forwardAlert dont submit AI generated answer.arrow_forwardChallenge Problem python G U E S S T H E N UM B E R Write a program that plays a guessing game with the user. The program should have the right answer set to 13, then prompt the user repeatedly to guess the number from 1 to 25. When the user guesses incorrectly, the game should give the user a hint about whether the correct answer is higher or lower than the guess. Once the user guesses correctly, the program should print a message showing the number of guesses that the user made. Note : This assignment involves the use of a while loop and if-else decision making controls. You CANNOT use the reserved keywords break and continue for any portion of this program or any program for that matter throughout this course.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Structured Chart; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=vdUO-sGA1DA;License: Standard YouTube License, CC-BY
Introduction to Structure Charts; Author: Christopher Kalodikis;https://www.youtube.com/watch?v=QN2bjNplGlQ;License: Standard Youtube License