Review the following code and select the response that is a subroutine. def calculate_price(item): total = 0 total = item + 12.00 return total def tips(price): tip = price * 0.15 return tip def add_to_pizza(item, item2, item3): toppings = 0 for x in item: toppings += 2.00 for y in item2: toppings += 2.00 for z in item3: toppings += 2.00 return toppings def main(): veggies = ['onion', 'peppers'] meats = ['pepporoni'] sauce = ['marinara'] toppings = add_to_pizza(veggies, meats, sauce) main() add_to_pizza item order_pizza price
I am pretty sure the answer is A.) " add_to_pizza"
@extrinix or @vocaloid could you look at this because I am a little stuck.
or @smokeybrown
I would agree that "add_to_pizza" is the only subroutine among the choices. "item" and "price" are both variables, and "order_pizza" does not actually appear in the code
Yep thanks!
Join our real-time social learning platform and learn together with your friends!