Calculate cumulative salary including raises Is there a way to make this more pythonic?

def money():
    current_salary = float(input("What is your current salary? "))
    years = int(input("How many years would you like to look ahead? "))
    amount_of_raise = float(input("What is the average percentage raise you think you will get? ")) * 0.01

    for years in range(1, years + 1):
        current_salary += current_salary * amount_of_raise
        print('Looks like you will be making', current_salary,' in ', years,'years.')
money()
As others have noted, you'll probably want to do some error-checking on your inputs, which means writing a helper function to handle your prompts.
You're writing a program that handles money and using binary floats, which are designed for scientific calculations. You are likely to run into a variety of small calculation errors! Python has a decimal module for calculations involving money. This will also make your input-handling easier.
Don't reuse "years" as the iterator in the for loop when you already have a variable with that name. It works here, but only by luck.
Prefer the format() method to straight concatenation. In this case it allows you to easily print your numbers with comma separators.


For example:

from decimal import *    

def get_decimal(prompt):
    while True:
        try:
            answer = Decimal(input(prompt + " "))
            return answer
        except InvalidOperation:
            print("Please input a number!")

def money():
    current_salary = get_decimal("What is your current salary?")
    years = int(get_decimal("How many years would you like to look ahead?"))
    percent_raise = get_decimal("What is the average percentage raise you think you will get?") * Decimal("0.01")
    for year in range(1, years+1):
        current_salary += percent_raise * current_salary
        line = "Looks like you will be making ${0:,.2f} in {1} years.".format(current_salary, year)
        print(line)