HackerRank 30 days of coding – Day1

HackerRank is a great tool to get yourself on track with coding. This is also a great platform in case you would like to do some competitive coding. I had started my journey with HackerRank few days ago with their 30 days code program.In this program they provide you one problem daily and you need to solve it with the programming language of your like. I wanted to explore python hence I am using python to solve those challenges. I will post my solution for each day in this blog. Following is the first problem.

Task:

Day1
Output Format:

 

Print the sum of both integers on the first line, the sum of both doubles (scaled to

decimal place) on the second line, and then the two concatenated strings on the third line.

 

Sample Input:

12
4.0
is the best place to learn and practice coding!

Sample Output:

16
8.0
HackerRank is the best place to learn and practice coding!

Solution:

i = 4
d = 4.0
s = 'HackerRank '

a= input("Enter a :") b= input("Enter b:")
c= raw_input("Enter String:")

print(a+i)
print(b+d)
print(s+c)
Advertisements

Leave a Reply