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
maxonik [38]
2 years ago
13

The cafeteria offers a discount card for sale that entitles you, during a certain period, to a free meal whenever you have bough

t a given number of meals at the regular price. The exact details of the offer change from time to time. Describe an algorithm that lets you determine whether a particular offer is a good buy. What other inputs do you need
Computers and Technology
1 answer:
melomori [17]2 years ago
8 0

Answer:

Explanation:

The algorithm can be described as follows

The first process is to ensure that the constraints for the time at which the offers begin is well defined.

TIME1 = 14:00

TIME2 = 16:00

TIME3 = 18:00

Then, decide the final number of meal following the free meal that has been offered.

NUMBER_OF_MEALS=4;

Then; decide the prices attached to the meal at regular times.

PRICE = 200;

At regular mode, decide the prices attached to the meal and as well as when the offer time commences.

PRICE_OFFER = 160;

Then ask the client(i.e the user) to put in the value required for the number of meals they desire to order.

Input values in n

Suppose (the value exceeds 8)

Then proceed to enquire from the client if they wish to go for the offer.

If not, use the regular price for the order.

Assume the client asks if the offer is a good one to bid for.

You are to show then the analysis of the calculation.

regular = 8 × PRICE

offer = 8 × PRICE_OFFER

profit = regular - offer

Finally, show the profit to the client which will let them know if it is good to bid for it or not.

You might be interested in
Difference between sorting and filtering​
Serggg [28]
<h3>Sorting</h3>

The term “sorting” is used to refer to the process of arranging the data in <u>ascending or descending order</u>.

Example: Statistical data collected can be sorted alphabetically or numerically based on the value of the data.

<h3>Filtering</h3>

The process of data filtering involves selecting a <u>smaller part of your data set to view or analyze</u>. This is done by using that subset to view or analyze your data set as a whole.

Example: A complete set of data is kept, but only a portion of that set is used in the calculation, so the whole set is not used.

<em>Hope this helps :)</em>

5 0
1 year ago
Read 2 more answers
Wilt short answer of the fol<br>What is an operating systeme te ay maglia<br>​
Mamont248 [21]

Answer:

well it game

Explanation:

its gamw because you have to be smart with word njbhjvkgv

6 0
3 years ago
The excessive use of the internet and the web for personal use at work is sometimes called ____ .
Elodia [21]
This is called Cyberslacking
7 0
3 years ago
Read 2 more answers
Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 5
omeli [17]

Answer:

The Following are the code to this question:

def cost(miles, milesPerGallon, dollarsPerGallon):##defining a method cost that accepts three parameter

   return miles / milesPerGallon * dollarsPerGallon# calculate cost and return it value  

milesPerGallon = float(input('Enter miles/Gallon value: '))#defining variable milesPerGallon for user input  

dollarsPerGallon = float(input('Enter dollars/ Gallon value: '))#defining variable dollarsPerGallon for user input

print('{:.5f}'.format(cost(10, milesPerGallon, dollarsPerGallon)))#call method and print its value

print('{:.5f}'.format(cost(50, milesPerGallon, dollarsPerGallon)))#call method and print its value

print('{:.3f}'.format(cost(400, milesPerGallon, dollarsPerGallon)))#call method and print its value

Output:

Enter miles/Gallon value: 20.0

Enter dollars/ Gallon value: 3.1599

1.57995

7.89975

63.198

Explanation:

In the above-given code, a method "cost" is defined, that accepts three value "miles, milesPerGallon, and dollarsPerGallon" in its parameter, and use the return keyword for calculating and return its value.

In the next step, two variable "milesPerGallon, and dollarsPerGallon" is declared, that use the input method with float keyword for input floating-point value.

After input value, it uses a print method with different miles values, which are "10,50, and 400", and input value to pass in cost method to call and print its return value.

5 0
3 years ago
Give at least five (5) practices that you must observe in your classroom.​
atroni [7]

Answer:

Offer second chances/clean slates.

Be resourceful.

Make learning active.

Be an advocate.

Pursue lifelong learning.

8 0
3 years ago
Read 2 more answers
Other questions:
  • You have implemented a network where hosts are assigned specific roles, such as for file sharing and printing. Other hosts acces
    7·1 answer
  • What do you call the number that is used as an index to pinpoint a specific element within an array?
    14·1 answer
  • Assume you have a byte-addressable machine that uses 32-bit word (integers are 32-bit) and you are storing the following informa
    5·1 answer
  • Which actions help to protect a computer and keep it running properly? Check all that apply.
    10·1 answer
  • In a systems development life cycle (SDLC) model, the purpose of the _____ is to create a physical model that will satisfy all d
    10·1 answer
  • Why might you want to save a downloaded file to your computer first instead of running it immediately?
    6·1 answer
  • Question<br> 1. Who was the first to use an abacus
    6·1 answer
  • 6. kinukuha nito ang kabuuang bilang ng mga numerical na datos sa mga piniling cells
    12·1 answer
  • How do we ensure that future technologies are fair to society?
    11·1 answer
  • Is a device used to test the network connection.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!