each tem, Assume the sales tax is 7 percent. 5. Distance Traveled Assuming there are no accidents or delays, the distance that a car travels down the inter state can be calculated with the following formula: Distance Speed x Time A car is traveling at 70 miles per hour. Write a program that displays the following: . The distance the car will travel in 6 hours . The distance the car will travel in 10 hours . The distance the car will travel in 15 hours unt of a purchase. The program S percent ic
each tem, Assume the sales tax is 7 percent. 5. Distance Traveled Assuming there are no accidents or delays, the distance that a car travels down the inter state can be calculated with the following formula: Distance Speed x Time A car is traveling at 70 miles per hour. Write a program that displays the following: . The distance the car will travel in 6 hours . The distance the car will travel in 10 hours . The distance the car will travel in 15 hours unt of a purchase. The program S percent ic
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Concept explainers
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Question
Python
Number 5 please need help

Transcribed Image Text:114
Chapter 2 Input, Processing, and Output
Programming Exercises
1. Personal Information
Write a program that displays the following information:
VideoNote
The Sales
Prediction Problem
. Your name
• Your address, with city, state, and ZIP
• Your telephone number
• Your college major
2. Sales Prediction
A company has determined that its annual profit is typically 23 percent of total sales. Write
a program that asks the user to enter the projected amount of total sales, then displays the
profit that will be made from that amount.
Hint: Use the value 0.23 to represent 23 percent.
3. Land Calculation
One acre of land is equivalent to 43,560 square feet. Write a program that asks the user to
enter the total square feet in a tract of land and calculates the number of acres in the tract.
Hint: Divide the amount entered by 43,560 to get the number of acres.
4. Total Purchase
A customer in a store is purchasing five items. Write a program that asks for the price of
each item, then displays the subtotal of the sale, the amount of sales tax, and the total
Assume the sales tax is 7 percent.
5. Distance Traveled
Assuming there are no accidents or delays, the distance that a car travels down the inter
state can be calculated with the following formula:
Distance =
Speed x Time
A car is traveling at 70 miles per hour. Write a program that displays the following:
. The distance the car will travel in 6 hours
. The distance the car will travel in 10 hours
. The distance the car will travel in 15 hours
6. Sales Tax
Write a program that will ask the user to enter the amount of a purchase. The program
should then compute the state and county sales tax. Assume the state sales tax is 5 percent
and the county sales tax is 2.5 percent. The program should display the amount of the
purchase, the state sales tax, the county sales tax, the total sales tax, and the total of the
sale (which is the sum of the amount of purchase plus the total sales tax).
Hint: Use the value 0.025 to represent 2.5 percent, and 0.05 to represent 5 percent.
7. Miles-per-Gallon
A car's miles-per-gallon (MPG) can be calculated with the following formula:
MPG = Miles driven + Gallons of gas used
Write a program that asks the user for the number of miles driven and the gallons of gas
used. It should calculate the car's MPG and display the result.
8. Tip, Tax, an
Write a program
program should
of a 18 percent
9. Celsius to E
Write a program
mula is as follo
The program s
perature conve
10. Ingredie
A cookie recip
•
1.5 cups of
• 1 cup of bu
2.75 cups c
The recipe pr
asks the user
of each ingre
11. Male ar
Write a prog
tered in a cla
Hint: Suppo
class. The pe
of females c
12. Stock
Last month
purchase:
. The num
• When Jo
• Joe paid
for the s
Two week-
The num
• He sold
He paic
he rece
Write a pr
. The am
. The am
. The an
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images

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.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education