Question: ##CODE IN PYTHON Part II Exercise 5 A new Shawarma place is in town. To attract customers, it starts a new offer: buy six shawarma
##CODE IN PYTHON

Part II Exercise 5 A new Shawarma place is in town. To attract customers, it starts a new offer: buy six shawarma get the seventh for free! Write a function shawarmacost with two arguments numShawarma (the number of shawarma that you order) and priceShawarma (price of each shawarma as they have different sizes and flavours) that returns the amount you have to pay. Don't forget, the seventh shawarma is free! Check your function by calculating some sample cases and running them in assert statements in the main function. Make sure you try different cases on the number of shawarma and the prices. If you are not sure about your own test cases try the below assert statements: assert shawarmaCost (5,11)==55 assert shawarmaCost (6,11)=66 assert shawarmaCost(7,11)=66 assert shawarmaCost (8,11)=77 for i in range (1,20,4) : assert shawarmaCost(,i)==0 assert shawarmaCost(5,i)=5i assert shawarmaCost (6,i)=6i assert shawarmaCost(7,i)=6i assert shawarmaCost(20,i)=18i assert shawarmaCost (21,i)=18i assert shawarmaCost (22,i)=19i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
