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
SVETLANKA909090 [29]
3 years ago
14

Define function print_popcorn_time() with parameter bag_ounces. If bag_ounces is less than 3, print "Too small". If greater than

10, print "Too large". Otherwise, compute and print 6 * bag_ounces followed by "seconds". End with a newline.
Computers and Technology
2 answers:
yawa3891 [41]3 years ago
8 0

Answer:

void print_popcorn_time(int bag_ounces){

   if(bag_ounces < 3){

       cout<<"Too small"<<endl;

   }else if(bag_ounces > 10){

       cout<<"Too large"<<endl;

   }else{

       cout<<(6 * bag_ounces)<<"seconds"<<endl;

   }

}

Explanation:

The function is the block of the statement which performs the special task.

For checking the condition in the program, the if-else statement is used.

It can check the condition one or two but if we want to check the more than two different conditions then the continuous if-else statement is used.

syntax of continuous if else:

if(condition){

statement;

}else if(condition)

statement;

}else{

statement;

}

In the question, there are three conditions;

1. bag_ounces is less than 3

2. bag_ounces greater than 10

3. else part.

we put the condition in the above if-else statement and print the corresponding message.

erastova [34]3 years ago
5 0

Answer:

def print_popcorn_time(bag_ounces):

   if bag_ounces < 3:

       print("Too small")

   elif bag_ounces > 10:

        print("Too large")

   else:

        bag_ounces = bag_ounces * 6

        print(bag_ounces, "seconds")

Explanation:

def print_popcorn_time(bag_ounces): #fed function

   if bag_ounces < 3:  #1st if statement

       print("Too small") #print function

   elif bag_ounces > 10: #else if

        print("Too large") #print than print

   else:  #else:

        bag_ounces = bag_ounces * 6 #do work

        print(bag_ounces, "seconds") #print

You might be interested in
When making an assembly of design what command is most.commonly used?
Schach [20]
There are two common command lines used in creating design assembly. The 'push' and 'pull' command. Both allows you to get parts from the original predelivered content's source desgian    and recreate the design faster and with less memory.
6 0
2 years ago
Two of the people most often credited with the invention of the Internet and WWW respectively are _____.
krek1111 [17]
Bob Kahn and Vint Cerf were both pioneers of the Internet, and Tim Berners-Lee was known for inventing the WWW.
7 0
3 years ago
What type of game is LEAST LIKELY to need a structured narrative?
VladimirAG [237]

Answer:

Probably a sports game

Explanation:

A role-playing means acting it out, so you need to explain the life with a structured narrative.

An adventure game needs lots of background, so you need to fill that in with a structured narrative.

A sports game revolves solely around sports, so you only need to know how to play the game and/or sport, so no structured narrative is needed.

An fps game needs a structured narrative in that it is similar to an adventure game and needs background.

Let me know if I was right! Hope this helped. :)

5 0
3 years ago
Describe FIVE significant advantages of web-based applications for an organisation.
masya89 [10]

Answer

There are a lot of advantages of web based applications.

Explanation:

Below are the advantages:

  1. Web based applications can be accessed from device that is connected to the device.
  2. No physical software required to download, install, update or manage which saves a lot of administration work for large companies.
  3. Web based software is compatible with any device or platform. The software is delivered through a browser of the users' choice.
  4. Mobile device applications allow for access to the software when out of the office.
  5. Direct access to latest information for Employees where every they are located.

Apart from these, there are lot more benefits, like quick and easy updates, centralized data where data is secure and easy to backup.  We can reach anybody, anywhere in the world.

Business costs are drastically reduced by spending less time talking to customers over the phone.

Online training can be finished at user's own time and risk.

It's available 24 hours a day, 7 days a week

The software is always up-to-date

8 0
2 years ago
The rubric given to them by their teacher requires that
Arte-miy333 [17]

Answer:1:navigate to the paragraph command group

2:Click the line and paragraph spacing option

3:Click the space required

Explanation:

3 0
3 years ago
Other questions:
  • A typical self-expelling fire extinguisher empties its contents in
    8·1 answer
  • What are some (free) good animation websites (for PC/Microsoft) for a short informational video about homelessness?
    15·1 answer
  • The word Only is absolute or qualified
    8·2 answers
  • To display “ hello ” message on the screen
    14·1 answer
  • One tool under What-If-Analysis is Scenarios. Which best describes the purpose of setting up and using scenarios
    5·1 answer
  • Identify what a computer needs to
    14·1 answer
  • There are many commercially made household linens found in the?
    7·1 answer
  • Which of these allows the programmer to put data inside a variable?
    5·1 answer
  • A Development team begins work on a new software application and decides to involve the client’s IT experts to ensure that secur
    12·1 answer
  • search engines use software that combs the web to find webpages and add new data about them to the database. what is this softwa
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!