I have attached all my code for the project i am working on, it has 2 more errors which i have to correct, the first being the red error on the left, to do with the get_tax() function, and the 2nd being logic error i believe.
La Python 3.8.3 Shell - 0 X La proj_4_to_fix_wishes.py - D:\\murach\\COP2002\\python\\project4\\proj_4_to_fix_wishes.py (3.8.3) 0 X File Edit Shell Debug Options Window Help File Edit Format Run Options Window Help Python 3.8.3 (tags/v3. 8.3: 6180832, May 13 2020, 22:20:19) [MSC v. 1925 32 bit (Intel) ] on win32 Type "help", "copyright", "credits" or "license ()" for more information. 4. Next, get tax took 0 positional arguements but is given 1, so i had to get it > > > to take 1 by == RESTART: D: \\murach\\COP2002\\python\\project4\\proj_4_to_fix_wishes . py This program will create a wish list for the user. 5. Enter as many items as you like, with their costs and the program will calculate your total, before and after 6: tax. def display_welcome () : Enter an item? y print ("This program will create a wish list for the user.") print ("Enter as many items as you like, with their costs") Y Enter the name of your item: print ("and the program will calculate your total, before and") book print ("after 68 tax.") Enter the cost of this item: 10 def get_item ( ) : Item: book for $ 10.0 repeat = ly" Enter an item? y while repeat . lower () == "y" or repeat . lower () == "n": print ("Enter an item? y ") Y Enter the name of your item: repeat = input () mouse if repeat . lower () == "y"; Enter the cost of this item: print ("Enter the name of your item: ") 20 item_name = input () Item: mouse for $ 20.0 print ("Enter the cost of this item: ") Enter an item? y item_cost = float (input () ) y item_cost = validate (item_cost) Enter the name of your item: print ("Item: ", item_name, " for $ ", round (item_cost, 2) ) shoes sub = 0 Enter the cost of this item: sub = sub + item_cost 30 else : Item: shoes for $ 30.0 print ("Your subtotal is $", round (sub, 2) ) Enter an item? y get_tax (sub) break n Your subtotal is $ 30.0 Traceback (most recent call last) : def validate (item_cost) : File "D: \\murach\\COP2002\\python\\project4\\proj_4_to_fix_wishes.py", line 77, in
while item cost > > total cost = sub + tax print ("Your total cost, including 68 tax, is $", round (total_cost, 2) ) goodbye ( ) def goodbye () : print ("Hope you get everything you wish for!") print ( "Goodbye! ") def main () : display_welcome () get_item ( ) get_tax ( ) # if started as the main module, call the main function if name_ == " main ": main ( ) Ln: 41 Col: 4 Ln: 45 Col: 33 Type here to search O eomana IN 2:51 PM 7/22/2020