DEV Community

M__
M__

Posted on

Day 0: Hello World.

This is always the foundation code every beginner learning programming, the ‘Hello World’ code. Mine is in python and it was quite straightforward as HackerRank have some tutorials on how to go about it(They have the tutorials in Java but for python I have used Python Tutorial and also W3Schools .

This however had a small twist whereby you are required to read input from the user then print this below the ‘Hello World’ statement:

Code Snippet:

# Read a full line of input from stdin and save it to our dynamically typed variable, input_string.
input_string = input()

# Print a string literal saying "Hello, World." to stdout.
print('Hello, World.')
print(input_string)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)