192k views
5 votes
Write a program that asks the user to input their first and last names. The first prompt should state:

Please input your first name:
The second prompt should state:

Please input your last name:
After accepting the inputs, your program should output the input in the form last name, first name.

Hint: Remember that you can concatenate (add) two phrases by using the + symbol. Don't forget that you'll need to add a comma as well and that the comma must be followed by a space.

User DIsoVi
by
5.1k points

1 Answer

3 votes

first = input("Please input your first name: ")

last = input("Please input your last name: ")

print(last+", "+first)

I hope this helps!

User Biplav
by
5.0k points