Welcome user with a message

Problem Statement

Read the name of user from standard input using input() function, and then print the greeting message “Hello username” where username is replaced with the name read from the user.

Input

The first line of input contains a sequence of integer values separated by space.

Output

Print the minimum of given integer values.

As is

main() function is there to call the read_and_display() function. Do not edit this code.

To do ✍

Complete the read_and_display() function to read user name entered by user via standard input, into the variable username, and print the message 'Hello username'.

Example 1

Test input

Ram

Test output

Hello Ram

Useful References

Python Program

# Complete the following function
# Read username from user via input, and display message
def read_and_display():




# Boilerplate code - Do not edit the following
def main():
    read_and_display()

if __name__ == "__main__":
    main()

Test case 1

ABC
Hello ABC

Test case 2

Hello

Test case 3

Moon
Hello Moon
# Complete the following function
# Read username from user via input, and display message
def read_and_display():
    username = input()
    print('Hello', username)

# Boilerplate code - Do not edit the following
def main():
    read_and_display()

if __name__ == "__main__":
    main()
show answer
main.py
⏵︎ Run Tests
Reset
Download
×
Code copied to clipboard successfully 👍