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. Remember that print() automatically adds a newline.

1 answer

def print_popcorn_time(bag_ounces):
if bag_ounces < 3:
print("Too small")
elif bag_ounces > 10:
print("Too large")
else:
print(6 * bag_ounces, "seconds")
Similar Questions
  1. How would I put this into one program?These are the directions: Write a method that takes two parameters. If the first parameter
    1. answers icon 0 answers
    1. answers icon 1 answer
  2. I posted this question before:How would I put this into one program? These are the directions: Write a method that takes two
    1. answers icon 5 answers
  3. For any constant c, define the function f_c(x)= x^3+2x^2+cx.(a) Graph y = f_c(x) for these values of the parameter c: c = -1, 0,
    1. answers icon 2 answers
more similar questions