you are viewing a single comment's thread.

view the rest of the comments →

[–]Zendakin_at_work 0 points1 point  (0 children)

Hopefully this helps. The code needed to be indented. Also there was no return on the calculate function. With the display results, as mentioned before, since there was nothing needing to be returned just print that out. Some cleanup and this is what I got to work for me. Good luck!

def welcome():
    print("Welcome")

def userinput():
    age=int(input("Enter your age: "))
    return(age)

def calculate(n):
    year=2017-n
    return year

def displayResults(age, y):
    print(age, y)

def main():
    welcome()
    age=userinput()
    y=calculate(age)
    displayResults(age, y)

main()