Username Generator
Write a program that will ask a user for their surname and their year of birth as a string. Using concatenation, combine both strings into a variable and display that back to the user.
Enter your surname: Smith Enter your birth year: 1977 Your username is: Smith1977
get surname from user as string get birth year from user as string concatenate surname and birth year to create username print "Your username is:" & username
surname = str(input("Enter your surname: "))
birth_year = str(input("Enter your birth year: "))
username = surname + birth_year
print("Your username is", username)
# Get surname and birth year from user
surname = str(input("Enter your surname: "))
birth_year = str(input("Enter your birth year: "))
# Concatenate surname and birth year to create username
username = surname + birth_year
# Display username to the user
print("Your username is", username)
Extension
Add a third input and include that within the username.
Enter the name of your favourite animal: Lion Enter your surname: Smith Enter your birth year: 1977 Your username is: LionSmith1977