You want to decide whether you should drive your car to work or take the train. You
Question:
You want to decide whether you should drive your car to work or take the train. You know the one-way distance from your home to your place of work, and the fuel efficiency of your car (in miles per gallon). You also know the one-way price of a train ticket. You assume the cost of gas at $4 per gallon, and car maintenance at 5 cents per mile. Write an algorithm to decide which commute is cheaper.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 62% (8 reviews)
Remember an algorithm in simple words means a set of instructions or steps to be followed ...View the full answer
Answered By
Sandra Dimaala
Sandra from Philippines ,LICENSED PROFESSIONAL TEACHER.
Teachers are our nation builders—the strength of every profession in our country grows out of the knowledge and skills that teachers help to instill in our children. And, as a nation, we must do much, much more to fully appreciate and support their work.
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
The Old School is trying to decide whether they should purchase or lease a new high-speed photocopier machine. It will cost the school $ 14,000 to purchase the copier and $ 750 each year to maintain...
-
The Hyatt Company is trying to decide whether it should purchase new equipment so that it can continue to make its engines, a key component of its final product, internally or whether production...
-
A homeowner wants to decide whether he should install an electronic heat pump in his home. Given that the cost of installing a new heat pump is fairly large, the homeowner wants to do so only if he...
-
Colt Division had the following results for the year just ended: Sales..................................$750,000 Contribution margin ..................300,000 Controllable...
-
Suppose we select two independent random samples from populations having means 1 and 2. If 1, = 151, 2 = 162, 1, = 6, 2 = 8, n1 = 625 and n2 = 625: a. Calculate a 95 percent confidence interval for 1...
-
You will use a CAS to help find the absolute extrema of the given function over the specified closed interval. Perform the following steps. a. Plot the function over the interval to see its general...
-
Do you think digital nomads make the reality of virtual organizations being widely available more or less likely in the future? Describe how the possibility of working for a virtual organization or...
-
Siebrecht organized Siebrecht Realty Co., a corporation, and then transferred his building to the corporation in exchange for its stock. The corporation rented different parts of the building to...
-
10- A double pain insulated window unit is installed in a store. The unit consists of two 10mm thick pieces of glass (k=0.05 W/make) separated by a 18mm layer of air. The unit is 3m high and 4m wide....
-
Consider a portfolio consisting of 7500 shares of Microsoft (MSFT) and 50,000 shares of AT&T (T) ? The current price of MSFT and T are $220 and $19 respectively. The portfolio has an annual expected...
-
Write a program that prints a greeting of your choice, perhaps in a language other than English.
-
Which parts of a computer can store program code? Which can store user data?
-
In business, firms that both cooperate and compete with other firms are described as engaging in "coopetition." A study published in Industrial Marketing Management (February 2016) examined the level...
-
discuss the OM system of Toyota Production Systems. Make certain, Kanban, Poka Yoke, Muda and Kaizen principles are discussed. Please provide examples of each.
-
Whole Foods satisfies its customers by carrying fresh organic produce and gluten-free products. Whole Foods is not a low-price grocery store, but it uses data analytics to understand what is...
-
First, describe the main factors you would assess when an employee starts a gradual return to work to ensure they are successful. Next, based on everything you have learned to date, explain the...
-
Friendly Foods Grocery is a full-service store with a bakery, deli, and butcher in addition to the frozen foods, canned foods, and boxed foods aisles. If Friendly Foods selected a cost flow...
-
Building collapse during fires are one of the biggest killers of firefighters. Why is it important for firefighters to understand the concept of loads and loading and the relationship with the five...
-
In Lesson 6.4, Exercise 15, you learned how to find the inverse of a square matrix using an augmented matrix. Use this method to find the inverse of the general 2 ( 2 matrix, Compare your results to...
-
The MIT Sloan School of Management is one of the leading business schools in the U.S. The following table contains the tuition data for the masters program in the Sloan School of Management. a. Use...
-
Another pitfall cited in Section 1.10 is expecting to improve the overall performance of a computer by improving only one aspect of the computer. Consider a computer running a program that requires...
-
Aside from the smart cell phones used by a billion people, list and describe four other types of computers.
-
For the following C statement, what is the corresponding MIPS assembly code? Assume that the variables f, g, h, i, and j are assigned to registers $s0, $s1, $s2, $s3, and $s4, respectively. Assume...
-
In your opinion, should couples who choose not to get married but who live in a common law like marriage be treated the same ay as married couples when it comes to division of family assets?
-
Why is Stark be written so broadly as to include businesses owned by family members of the physician? Why do you think cousins, aunts and uncles are excluded from the definition of 'immediate family...
-
Briefly summaries the components of an organization external business environment MMM132 - Management - Trimester 1 2023 Part A1.1: Business Report Progress Assessment (Individual) Word Limit: 500...
Study smarter with the SolutionInn App