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
Setler [38]
4 years ago
11

Bianca is preparing special dishes for her daughter’s birthday. It takes her a minutes to prepare the first dish, and each follo

wing dish takes b minutes longer than the previous dish. She has t minutes to prepare the dishes. For example, if the first dish takes a = 10 minutes and b = 5, then the second dish will take 15 minutes, the third dish will take 20 minutes, and so on. If she has 80 minutes to prepare the dishes, then she can prepare four dishes because 10 + 15 + 20 + 25 = 70. Write a program that prompts the user to enter the values of a, b, and t, and outputs the number of dishes Bianca can prepare.
Computers and Technology
1 answer:
blagie [28]4 years ago
4 0

Answer:

The solution code is written in Python:

  1. a = int(input("Input first dish time: "))
  2. b = int(input("Input extra minutes: "))
  3. t = int(input("Input time available: "))
  4. dishesCount = 1  
  5. currentTotal = a + b
  6. while(currentTotal <= t):
  7.    dishesCount += 1
  8.    currentTotal += currentTotal + b
  9. print("Number of dishes can be prepared: " + str(dishesCount))

Explanation:

Firstly, prompt user to input the first dish time, extra minutes and time available and assign the values to variable a, b and t, respectively (Line 1-3).

Next, create variable dishesCount to hold the number of dishes can be prepared (Line 5).

Get the current total time by adding a and b and assign it to variable currentTotal (Line 6).

While the currentTotal is less than or equal to t, increment the dishesCount by one and then add the hour of current dish to the currentTotal (Line 9-10).

At last, display the number of dishes that can be prepared in t minutes (Line 12).

You might be interested in
How do computers perform complicated tasks built from simple instructions?
wlad13 [49]
They use and perform a set of actions and programs that build on each other.
8 0
4 years ago
How can you specify a page has the highest priority?
coldgirl [10]

Answer:

1.0

Explanation:

Priority Tag is to be mentioned in Sitemaps

Various priority values range from 0.1 to 1.0. The highest priority page has the priority value = 1.0, and the lowest priority page has a value of 0.0, and the priority value varies with the priority of the page. And these values are assigned to the priority tag in the sitemap. The sitemap, in fact, is the XML file through which we can set the priority of a webpage.  

8 0
4 years ago
What is another name for “low-angle lighting”?
Sliva [168]
Another name for low-angle lighting is under-lighting.
4 0
3 years ago
TASK 1. JUMBLE ME! Direction: Arrange the jumbled letters to form a word. 1. PEREAM 2. RRENT CU 3. METREMO H 4. TORSISER 5. TANC
ivanzaharov [21]

The Rearrangement of the words are:

  1. Ear map
  2. Rent cup
  3. METREON
  4. Sister or
  5. Sister Cane

<h3>What is arrangement of words?</h3>

A sorting method is known to be the orders of entries that are based on each word or phrase found in a heading, e.g. spaces, etc.

The Rearrangement of the words are:

  1. Ear map
  2. Rent cup
  3. METREON
  4. Sister or
  5. Sister Cane

Learn more about Arrangement from

brainly.com/question/984329

#SPJ1

6 0
2 years ago
What is the disadvantage of a series circuit? A. The lights in a series circuit shine too brightly B. A series circuit can have
zhuklara [117]
The answer is B or C
4 0
4 years ago
Other questions:
  • Which statement is true? Group of answer choices Variables cannot be assigned and declared in the same statement Variable names
    5·1 answer
  • What are some of the issues that organizations need to be aware of when designing and managing data?
    8·1 answer
  • Given the availability of an ofstream object named output, write the other statements necessary to write the string "3.14159" in
    8·1 answer
  • The business case for using grid computing involves all of the following except: speed of computation. cost savings. agility. in
    5·1 answer
  • Given an array arr of type int , along withtwo int variables i and j , write some code thatswaps the values of arr[i] and arr[j]
    6·1 answer
  • How would you define media literacy?
    12·1 answer
  • Your it department enforces the use of 128-bit encryption on all company transmissions. your department also protects the compan
    13·1 answer
  • The words that follow a code number in the cpt manual are called the
    12·1 answer
  • Write a method that accepts a string as an argument and checks it for proper capitalization and punctuation. The method should d
    14·1 answer
  • Find the output<br>I need it immediately​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!