answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
givi [52]
1 year ago
12

Write a program that calculates taxi fare at a rate of $1.50 per mile. Your pro-gram should interact with the user in this manne

r:TAXI FARE CALCULATOREnter beginning odometer reading=> 78602.5Enter ending odometer reading=> 78622.7You traveled a distance of 20.2 miles. At $1.50 per mile,your fare is $30.30.
Computers and Technology
1 answer:
NISA [10]1 year ago
8 0

Answer:

print("TAXI FARE CALCULATOR\n")

beginning = float(input("Enter beginning odometer reading => "))

ending = float(input("Enter ending odometer reading => "))

distance = ending - beginning

fare = 1.50 * distance

print("You traveled a distance of %.1f" % distance + " miles. At $1.50 per mile, your fare is $ %.2f" % fare)

Explanation:

*The code is in Python.

Print the title

Ask the user to enter beginning and ending of the odometer reading. Calculate the distance by subtracting these values

Calculate the fare, multiply the distance by 1.50

Print the distance and fare in required format

You might be interested in
Which are examples of copyrighted online materials? Check all that apply.
Stella [2.4K]
The answers are 1, 3, and 5.
7 0
1 year ago
Read 2 more answers
You are attempting to open a file containing a list of integer numbers, each on a separate line, and read them into Python as in
baherus [9]

Answer:

The answer to this question can be given as:

Statement:

number = int(line.strip())

Explanation:

In the above statement, we declare an integer variable number accept the integer value from the file that name is line. In this line, we use the strip() function. This function returns a duplicate string with both starting and tracking characters removed (based on the string parameter passed). The strip() function removes characters from both sides (left and right) based on the parameter(a string defining the collection of characters to be removed).

7 0
1 year ago
Consider a maximal flow problem in which vehicle traffic entering a city is routed among several routes before eventually leavin
ohaa [14]

Answer:

c. the arcs represent one-way streets.

Explanation:

7 0
1 year ago
The given SQL creates a Movie table with an auto-incrementing ID column. Write a single INSERT statement immediately after the C
Snowcat [4.5K]

Answer:

INSERT INTO Movie(Title,Rating,ReleaseDate)

VALUES("Raiders of the Lost ArkPG",'PG',DATE '1981-06-15'),

("The Godfaher",'R',DATE '1972-03-24'),

("The Pursuit of Happyness",'PG-13',DATE '2006-12-15');

Explanation:

The SQL statement uses the "INSERT" clause to added data to the movie table. It uses the single insert statement to add multiple movies by separating the movies in a comma and their details in parenthesis.

3 0
1 year ago
When preparing a spreadsheet that contains population data for different nations, what is the best way to provide a visual compa
finlep [7]
The best answer to the question above would be option C: <span>create a bar graph that shows population totals for each nation. Since it emphasizes a visual comparison, the best way to do this is to create a bar graph. So in a bar graph, the numerical values of the variables are also presented such as the population total of each nation. In addition, the rectangular bars can easily show you the difference between each nation which makes this an ideal visual tool for comparison.</span>
7 0
1 year ago
Read 2 more answers
Other questions:
  • The term load is often used to describe opening a page in a ____. Answer
    11·1 answer
  • A two-dimensional array can have elements of ________ data type(s).
    7·1 answer
  • Jacob wants to be a Steamfitter. He just finished his associate’s degree. Which best describes what he should do next?
    10·2 answers
  • The ________ utility automatically creates duplicates of your libraries, desktops, contacts, and favorites to another storage lo
    6·1 answer
  • Which of the following is an Internet supervisory protocol? O DNS IP O both A and B O neither A nor B
    12·1 answer
  • Design a program that asks the user for a series of names (in no particular order). After the final person’s name has been enter
    5·1 answer
  • In Section 8.5.4, we described a situation in which we prevent deadlock by ensuring that all locks are acquired in a certain ord
    11·1 answer
  • 1. Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in
    7·1 answer
  • Amanda a recently moved into a new home. Everyone has their own tablet, and wants to connect to the same network, no matter wher
    12·1 answer
  • Which characteristic of Cloud computing allows data centers to better manage hard drive failures and allocate computing resource
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!