Implement the design of the Pizza class so that the following output is produced: # Write your codes here. # Do not change the following lines of code. print("Pizza Count:", Pizza.pizza_count) print("=======================") p1 = Pizza("Chicken") p1.set_toppings_info(25, 1, 4, 0) p1.display() print("------------------------------------") p2 = Pizza("Olives") p2.set_toppings_info(15, 1.5, 0, 0) p2.display() print("------------------------------------") p3 = Pizza("Sausage") p3.set_toppings_info(50, 5, 2, 0) p3.display() print("=======================") print("Pizza Count:", Pizza.pizza_count) Output: Pizza Count: 0 ======================= Toppings: Chicken 25 calories 1 g fat 4 g protein 0 g carbs ------------------------------------ Toppings: Olives 15 calories 1.5 g fat 0 g protein 0 g carbs ------------------------------------ Toppings: Sausage 50 calories 5 g fat 2 g protein 0 g carbs ======================= Pizza Count: 3
Implement the design of the Pizza class so that the following output is
produced:
# Write your codes here.
# Do not change the following lines of code.
print("Pizza Count:", Pizza.pizza_count)
print("=======================")
p1 = Pizza("Chicken")
p1.set_toppings_info(25, 1, 4, 0)
p1.display()
print("------------------------------------")
p2 = Pizza("Olives")
p2.set_toppings_info(15, 1.5, 0, 0)
p2.display()
print("------------------------------------")
p3 = Pizza("Sausage")
p3.set_toppings_info(50, 5, 2, 0)
p3.display()
print("=======================")
print("Pizza Count:", Pizza.pizza_count)
Output:
Pizza Count: 0
=======================
Toppings: Chicken
25 calories
1 g fat
4 g protein
0 g carbs
------------------------------------
Toppings: Olives
15 calories
1.5 g fat
0 g protein
0 g carbs
------------------------------------
Toppings: Sausage
50 calories
5 g fat
2 g protein
0 g carbs
=======================
Pizza Count: 3
Step by step
Solved in 2 steps with 4 images