Sorry if this is confusing, I'm just trying to figure out how to find how much money is in the percentage. Say the user inputs 30% of gdp spending, I'd like to figure out how much that 30% is.
gdp = 0
spending = 0
gdpinput = int(input("Enter your countries GDP: ")) This lets the user input the country's gdp
spending = int(input("Enter the spending % of gdp (ex. 0.03 for 3%): ")) This asks the user to input the country's spending
budget = (gdpinput / spending) * 100 This was my failed calculation
I think I've figured it out.
budget = (gdpinput / spending) * 100
budget = (gdpinput * spending) / 100