r/pythonhelp • u/Pretty_Cherry_7848 • May 10 '24
I'm making a simple program that calculates percentages and I'm getting strange results, can someone check it for me?
print("If you want to choose counting percentages, choose 1, if you want to choose counting numbers, choose 2")
selection = int(input( ))
if selection == 1:
first_number = int(input("What is the number?: "))
first_number_percent = int(input("What's the percentage?: "))
second_number = int(input("What is the second number?: "))
x = 1
result = (first_number_percent * second_number) / (first_number * x)
print(result)
else:
print("not yet")
2
Upvotes
View all comments
1
u/Loud-Significance720 May 11 '24