I have a class assignment but the code doesn't seem to work, what am I doing wrong?

Viewed 32
#Develop a Python program that prompts the user to enter the number of baseballs purchased
#In addition the program should ask the user if they want giftwrapping and if so add another #$2.00 to the order.
#The program should then display the amount of the discount (if any) and the total amount of #the purchase after the discount and including the giftwrapping if needed.

Quantity # Discount

0 - 9 # 0%

10 - 50 # 5%

51 or more # 10%

baseballs = int(input("Enter the number of baseballs purchased: "))
if(baseballs>0):
    if baseballs<=9:
       disc = baseballs*0.00
    elif baseballs<=50:
       disc = baseballs*0.05
    elif baseballs>=51:
        disc=baseballs*0.10
        print("Discount : ",disc)
gift_wrapping = input("Do you want gift wrapping?: ")
print(baseballs + " " + "baseballs purchased" )
print(gift_wrapping)
0 Answers
Related