Question: Python code please. 6.43 LAB: Pizza Ordering using Arbitrary Optional Keyword Arguments For this lab you will build a system to support pizza ordering, Write


Python code please.
6.43 LAB: Pizza Ordering using Arbitrary Optional Keyword Arguments For this lab you will build a system to support pizza ordering, Write a function pizzaProcess() that takes the following inputs: customer name customer phone number (as a string) a customer ID string that defaults to 'new customer' if not provided, and a variable-length list of keyword arguments that correspond to toppings. . The keyword arguments are the toppings for the pizza, and the value is the cost of that topping. Every time your function is called in the Unit Test, you will get a different list of toppings and costs. Your main program does not need to output anything or process any input except for your own testing; an example is provided in the template. You should output a formatted string representing the order information, and the total cost for all toppings. For example, given input of: ('andy', '215-867-5309', Onions=4.8, Extra_cheese=3.2) your function should return a string that equals: order for andy :: 215-867-5309 :: new customer :: Onions :: Extra_cheese, total due=$8.00 note that the total cost should be formatted as dollars and cents (2 significant digits). Be sure to match white space and formatting. Hint: you can format a string without printing it using: outputString='{} '.format('hello', 'world') CONCEPT REVIEW: Arbitrary lists of optional keyword arguments Any function definition is allowed one and only one optional argument with ** prepended to is identifier. Inside the function, this identifier is interpreted as a dictionary. The keys in this dictionary are the names of keyword arguments appearing in a function call, and their values are the keyword argument values in the function call. In the function call, any optional keyword arguments that are not explicitly listed in the function definition def statement are put into this **-prepended identifier for the function to use. 289182.1640238 LAB ACTIVITY 6.43.1: LAB: Pizza Ordering using Arbitrary Optional Keyword Arguments 0/4 pizzaProject.py Load default template... 1 ''! Your code goes here! 2 def pizzaProcess 3 if __name__ == "__main__": 4 my_result = pizzaProcess('andy', '215-867-5309', Onions=4.8, Extra_cheese=3.2) 5 print(my_result)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
