Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

write a python program which accepts the user

firstName = input("Enter your first name : ") # ask for the user's first name
lastName = input("Enter your last name : ") # ask for the user's last name
print(f"Hello {lastName} {firstName}") # print the whole
# We here used a f-string which allows to put variables' value in a string
# by writing them between {}
 
PREVIOUS NEXT
Tagged: #write #python #program #accepts #user
ADD COMMENT
Topic
Name
4+1 =