Question: Hello, someone helped me with a question with a code, yet unfortunately, it did not work. By the way, thanks for the help. Would you

Hello, someone helped me with a question with a code, yet unfortunately, it did not work. By the way, thanks for the help. Would you mind helping me see what it is wrong with the corrected code? Please and thank you.

The final corrected code should look like this:

def menu():

print("Choose a pneumatic")

print(" 1for synthetic")

print(" 2 for hybrid ")

print(" 3 for natural")

opc=int(input(" Chose an option n"))

neu=int(input("How many do you need "))

cal(opc, neu)

def cal(opc, neu):

if opc==1:

dis=0.05

if neu >=10:

tot=neu*12000*dis

print("The total is ",tot)

else:

tot=neu*12000

print("The total is ",tot)

elif opc==2:

dis=0.10

if neu >=10:

tot=neu*45000*dis

print("The total is ",tot)

else:

tot=neu*12000

print("The total is ",tot)

else:

dis=0.07

if neu >=10:

tot=neu*25000*dis

print("The total is ",tot)

else:

tot=neu*12000

print("The total is ",tot)

menu()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!