python - error with function missing a positional argument -
I am getting an error in my program that explains that discovery () fails a required positional logic Can not seem to figure out how to properly detect discount function code can someone please help? I'm sure this is a simple error but I'm new to Python and especially functions. Thanks!
def finddiscount (discount): if quantity & gt; = 1 more volume & lt; = 9: discount = "0%" elif volume & gt; = 10 more quantity & lt; = 1 9: discount = "20%" alip volume> = 20 and volume and lt; = 49: Discount = "30%" Alif Volume> = 50 and Quantity & lt; = 99: discount = "40%" alif volume> = 100: discount = "50%" print (discount) def main (): volume = int (input ("how many packages have been purchased?")) = Value float Input ("How much is each item?") Finddiscount) Return def findiscount (quantity): If the volume> = 1 more volume & lt; = 9: discount = "0%" elif volume & gt; = 10 more quantity & lt; = 19: discount = "20%" elif volume & gt; = 20 more quantity & lt; = 49: discount = "30%" elif volume & gt; = 50 more quantity & lt; = 99: discount = "40%" alip volume & gt; = 100: discount = "50%" print (discount) main ()
If the statement (and can escape the cache of unexpected errors - what is the quantity = 0? Or 110?) Is like this:
Comments
Post a Comment