Allow customers the option of choosing a three-scoop, two-scoop, or one-scoop creation at a base price of $4.00, $3.00, or $2.20, respectively. Let the customer choose chocolate, strawberry, or vanilla as the primary flavor. If the customer adds nuts, whipped cream, or cherries to the order, add $0.50 for each to the base price. After the customer clicks an Order Now button, display the price of the order. in python

Respuesta :

Answer:

The code is as follows

Explanation:

Declarations are as below

Label titleLabel

Label Scoop

Label Flavor

Label Topping

RadioButton Scoopl

RadioButton Scoop2

RadioButton Scoop3

RadioButton Flavorl

RadioButton Flavor2

RadioButton Flavor3

CheckButton Toppingl

CheckButton Topping2

CheckButton Topping3

orderRoutine()

           if Scoops = "Three Scoop" then

                       price = 4

           else

                       if Scoops = "Two Scoop" then

                                   price = 3

           else

                                   price = 2.20

                       endif

           endif

          Tprice=price+sum(Topping)*0.5

          return Tprice;

ACCESS MORE