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
mixer [17]
3 years ago
15

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. Sample output with input: 7 42 seconds
Computers and Technology
1 answer:
Gnoma [55]3 years ago
3 0

Answer:

public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

Explanation:

Using Java prograamming Language.

The Method (function) print_popcorn_time is defined to accept a single parameter of type int

Using if...else if ....else statements it prints the expected output given in the question

A complete java program calling the method is given below

public class num6 {

   public static void main(String[] args) {

       int bagOunces = 7;

       print_popcorn_time(bagOunces);

   }

   public static void print_popcorn_time(int bag_ounces){

       if(bag_ounces<3){

           System.out.println("Too Small");

       }

       else if(bag_ounces>10){

           System.out.println("Too Large");

       }

       else{

           bag_ounces*=6;

           System.out.println(bag_ounces+" seconds");

       }

   }

}

You might be interested in
What is the atomic number of neonWhat do the following results from the TEST FOR LIFE tab indicate about the sample
Scorpion4ik [409]
The atomic number for Neon is 10.

I do not see the info for the second part of the question
6 0
3 years ago
I couldn't log in cuz I was banned but here I am with the same username again lol hi
rodikova [14]

Answer:

hi how are you......

Explanation:

6 0
3 years ago
Plz hurry !!!
lakkis [162]

Answer: The <u>Ordering Tag List </u>defines the numbering styles of lists in HTML pages.

<ol>

</ol>

Inside this tag, you have <li></li> which will contain individual lists.

For example:

<ol>

   <li> This is my first point. </li>

   <li> This is my second point. </li>

   <li> This is my second point. </li>

</ol>

is displayed as:

1. This is my first point. 

2. This is my second point. 

3. This is my second point.

Read more on Brainly.com - brainly.com/question/9724249#readmore

Explanation:

8 0
3 years ago
Read 2 more answers
After an extruded feature has been created, you can always go back and edit the feature. When you edit an existing extrude featu
Pani-rosa [81]

Answer:

After an extruded feature has been created, you can always go back and edit the feature. When you edit an existing extrude feature, <u>the shape of the sketch profile</u> cannot be changed from the Extrude Property Manager.

<u>Extrude PropertyManager</u>

A tool that is used to draw different sketch. The sketches are related to different fields. Extrude property manager is used to edit the sketch, delete some objects form the sketch but we cannot edit the shape of the sketch profile.

<em>In this tool we can edit every thing but cannot edit the shape of the sketch profile.</em>

3 0
3 years ago
Can anyone give me nitrotype gold? Name username is lol3628 display name is iluvkitkats
Vsevolod [243]

Answer:

no

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • helppppp asap!!!!!!!!!! Sara has just started using the Internet. She would like to be a little more efficient. In 3–4 sentences
    9·2 answers
  • You have an insurance policy with a $300 premium and a $500 deductible. How much should you expect to pay the insurance company
    15·1 answer
  • A certain computer has a 4meg address space. how many bits wide is this computer's address bus?
    10·1 answer
  • A) What is the maximum value that can be represented as an unsigned n-bit binary integer?
    13·1 answer
  • Write a Java program that prompts the user for an int n. You can assume that 1 ≤ n ≤ 9. Your program should use embedded for loo
    5·1 answer
  • PLEASE HELP! One of the nice byproducts of joining a club, organization, community service project, or service learning project
    6·1 answer
  • A(n)_________________printer is produce high-quality and is inexpensive *​
    14·1 answer
  • Iciples UI
    12·1 answer
  • I really need this done Thank you!!
    6·1 answer
  • Mha lovers why do other anime lovers report mha lovers for not liking there anime?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!