# Allison Obourn
# CS 115, Autumn 2021
# Lecture 4

# This program prompts the user to enter their age as a whole number
# and then outputs their age in years and the number of years until they
# can retire, assuming they can retire at 65. It then prints out the users
# age squared. 

def main():
    # NOTE: remember we had to put int() around our input statement so that
    #       the number the user typed would be treated as an integer by Python.
    #       By default Python treats everything a user types as a string.
    age = int(input("How old are you? "))
    print("You are ", age, "years old.")
    years = 65 - age
    print(years, "years until retirement!")

    # NOTE: remember the ** operator is the exponent operator. Here, age is the
    #       base and 2 is the exponent
    squared = age ** 2

    # NOTE: squared is an integer. We cannot use a plus with a number and a
    #       string. In order to be able to use plus to print a string and
    #       variable together in the same print statement we need to tell
    #       Python to treat the number as a string (with str()) so that it
    #       knows we want it to combine two strings into one longer string
    #       and print that.
    print("Your age squared is " + str(squared) + "!")
    
main()    
