HackerRank Day 0 Solution in Python: Hello World

Today we will see the HackerRank Day 0 Solution in Python. The problem is named Hello World which is part of 30 Days of code on HackerRank. Let’s get started!

Day 0: Hello World Problem statement

Our task is to save a line of input from the user to a variable, then print Hello, World. on a single line, and finally, print the value of your variable on a second line.

Sample Input

Welcome to 30 Days of Code!

Sample Output

Hello, World. 
Welcome to 30 Days of Code!

You can solve the problem here.

HackerRank Day 0 Solution in Python

input_string = input()

# Printing "Hello, World." and the input string
print('Hello, World.')

Code Explanation

  • We got the input from the user. Then, we print “Hello, World.” and the input string

Also Read:


Author: Ayush Purawr