Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- This program will perform the following.
- * Greet a User
- * Collect the Users name
- * Greets the User by name
- * Collects the users age
- * Adds one year to it to find how old they'll be next year
- '''
- #print a greeting
- print ('Hello User')
- #ask user for their name and collect it
- print('What is your name?') #ask for name
- myname = input() #collects name
- #Greets the user and returns name
- print('It is good to meet you '+myname)
- #calculate length of name
- print('The length of your name is: ')
- print(len(myname))
- #collect the users age
- print('What is your age') #ask for their age
- myage = input()
- #Print the users age and add 1 to it to collect how old they'll be in a year.
- print('You will be ' + str(int(myage) + 1) + ' in a year.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement