Q. Write Python command/instruction/statement to display your name.


Answer :-

name = input("Enter Your Name :- ")
print ("Your Name is :- ", name)


Output:-

Enter Your Name :- Path Walla
Your Name is :-  Path Walla
>>>

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Can you please explain this answer a little bit more

    ReplyDelete
    Replies
    1. The input() function is used to display a prompt message to the user and wait for their input. In this case, the prompt message is "Enter Your Name :- ". The user is expected to enter their name after seeing this prompt.

      The input() function returns the user's input as a string. The entered name is then stored in the variable name.

      The print() function is used to display the message "Your Name is :- " followed by the value of the name variable. The name variable holds the user's input, which represents their name.

      Delete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post