-1

Ok, so I've asked a question about this program before, but I'm still confused. This is my code:

value = ""
print("Number increase or decrease by percent")
print("")
print("Increase or decrease:") 
option = input()
print("Number:") 
num = float(input())
print("Percent:") 
percent = float(input())
if option == "increase" or "Increase":
    value = str(num + (num / 100 * percent))
elif option == "decrease" or "Decrease":
    value = str(num - (num / 100 * percent))
print(value)

And when I input decrease, it shows the number being increased by the percent. However, this is not what I want. Does anybody know what's going on? Any help is appreciated!

Achlys
  • 1

1 Answers1

0

try this edit:

if option == "increase" or option == "Increase":
    value = str(num + (num / 100 * percent))
elif option == "decrease" or option == "Decrease":
    value = str(num - (num / 100 * percent))

otherwise, the first if-statement will always be True.