1answer.
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
Tatiana [17]
2 years ago
15

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.
Computers and Technology
1 answer:
tester [92]2 years ago
3 0

<u>Explanation:</u>

Remember, an algorithm in simple words means a set of instructions or steps to be followed in other to solve a problem.

Note, to decide which commute is cheaper, it means the output of the algorithm should be the cheaper way to commute.

Using pseudocode do the following;

  • determine the inputs and outputs of the problem
  • arrange the identified problem into micro-tasks
  • describe each micro-tasks in the pseudocode
  • Test the pseudocode by solving the problem.

                       

You might be interested in
Como interactua el hardware de la computadora con el ser humano
soldi70 [24.7K]

Answer:

Los humanos interactúan con las computadoras a través de una interfaz de usuario

7 0
2 years ago
There is the Iphone MAX, Iphone XR and Iphone XS. which iphone is the very NEWEST and which one do you recommend? explain.
Pavlova-9 [17]

Answer:me myself would go with the Iphone XR

Explanation:

Because its like a combined phone of those two phones together and its not as exspnsive as the other phones and overall its good cause i have had it since it came out and had no problems with it.

3 0
2 years ago
Read 2 more answers
Define input hardware​
luda_lava [24]
It’s a piece of hardware (you can touch it) that changes something on the screen. Examples are a keyboard putting letters on the screen or a mouse moving the cursor
6 0
2 years ago
Write a script that calculates the common factors between 8 and 24. To find a common factor, you can use the modulo operator (%)
AnnyKZ [126]

Answer:

  1. common = []
  2. num1 = 8
  3. num2 = 24
  4. for i in range(1, num1 + 1):
  5.    if(num1 % i == 0 and num2 % i == 0):
  6.        common.append(i)
  7. print(common)

Explanation:

The solution is written in Python 3.

Firstly create a common list to hold a list of the common factor between 8 and 24 (Line 1).

Create two variables num1, and num2 and set 8 and 24 as their values, respectively (Line 3 - 4).

Create a for loop to traverse through the number from 1 to 8 and use modulus operator to check if num1 and num2 are divisible by current i value. If so the remainder of both num1%i and num2%i  will be zero and the if block will run to append the current i value to common list (Line 6-8).

After the loop, print the common list and we shall get [1, 2, 4, 8]

8 0
3 years ago
Blender questions
Arisa [49]
Hey 

7 is true 

8 <span>
the user preference settings</span>
6 0
3 years ago
Other questions:
  • A patent facilitates a government-approved technological monopoly by
    5·1 answer
  • Which files track internet usage and personal information when people visit websites?
    14·2 answers
  • This type of peripheral is used to interact with, or send data to, the computer.
    12·2 answers
  • A(n) _____ is a telephone facility that manages incoming calls, handling them based on the number called and an associated datab
    5·1 answer
  • Write a Twitter class that sets the Twitter user first (who is to be followed) and lets the client add up to 5 followers, which
    10·1 answer
  • (PYTHON HOMEWORK)Given the following code snippet, which statement tests to see if all three sets are equal?:
    11·1 answer
  • In C#Write the program SubscriptExceptionTest in which you use an array of 10 doubles. Write a try block in which you place a lo
    5·1 answer
  • True / False
    6·1 answer
  • 1 pound is equivalent to how many grams?<br>A.463.59 grams<br>B.10 grams<br>C.59 grams<br>D.5 grams​
    8·2 answers
  • Where is the flash drive listed in a windows 7 save as dialog box?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!