120k views
12 votes
python. create a program that asks the user to input their first name and their favorite number. Then the program should output the user's name and favorite number in the following format: "[first names]'s favorite number is [number]!"​

User Ponmudi VN
by
3.9k points

1 Answer

8 votes

name = input("What is you name?")

fav_number = input("What is you favorite number?")

print(name + " your favorite number is " + fav_number + "!")

User Dtyler
by
3.5k points