lundi 22 février 2021

Python-Else\If functionality [closed]

I am new to programming and I'm using Python to learn and improve.

I have encountered an issue with the one of my first attempts at a project.

X = int(input("Total Cost"))
Amount = int(input("Enter the amount of items in the box"))

Gainz = int(input("Enter Percentage you want to gain"))
Tax = input("Is this Taxable, Yes/No")

Tax2 = .15
if input == 'yes':
    print("Yes", "This is Taxable")
    print("You Paid", "$", X, "for", Amount, "items")
    print("Which means you paid", "$", X / Amount, "for each item")
    print("You should sell for $", X / Amount + Gainz + Tax2, "Each")
else:
    print("No", ",This is not Taxable")
    print("You Paid", "$", X, "for", Amount, "items")
    print("Which means you paid", "$", X / Amount, "for each item")
    print("You should sell for $", X / Amount + Gainz, "Each")

The ideal outcome is for the user to input the total cost they paid for something, with the amount of items in that box. The user would also have the ability to enter the percentage of taxes they would have to pay and finally how much percent off of the product they would like to gain.

Kindly let me know if there's any issues that I may have overlooked or how I could improve, this would be greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire