You are viewing a single comment's thread. Return to all comments →
Hello,
This is the backstory. When I 'Run Code', my "Sample Test case 0" is correct. When I "Submit Code", I get the wrong answer on "Test case 1".
i = 4 d = 4.0 s = 'HackerRank '
i2 = 12 d2 = 4.0 s2 = 'is the best place to learn and practice coding!'
i3 = i + i2 d3 = d + d2 s3 = s + s2
print(i3)
print(d3)
print(s3)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Data Types
You are viewing a single comment's thread. Return to all comments →
Hello,
This is the backstory. When I 'Run Code', my "Sample Test case 0" is correct. When I "Submit Code", I get the wrong answer on "Test case 1".
i = 4 d = 4.0 s = 'HackerRank '
Declare second integer, double, and String variables.
i2 = 12 d2 = 4.0 s2 = 'is the best place to learn and practice coding!'
Read and save an integer, double, and String to your variables.
i3 = i + i2 d3 = d + d2 s3 = s + s2
Print the sum of both integer variables on a new line.
print(i3)
Print the sum of the double variables on a new line.
print(d3)
Concatenate and print the String variables on a new line
print(s3)
The 's' variable above should be printed first.