Skip to content

Instantly share code, notes, and snippets.

@brockthebear
Created April 12, 2017 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brockthebear/581a46dc25b901d34f19c31b95bc6701 to your computer and use it in GitHub Desktop.
Save brockthebear/581a46dc25b901d34f19c31b95bc6701 to your computer and use it in GitHub Desktop.
import sys
i = 4
d = 4.0
s = 'HackerRank '
# Declare second integer, double, and String variables.
# Read and save an integer, double, and String to your variables.
my_int = int(sys.stdin.readline())
my_dbl = float(sys.stdin.readline())
my_str = sys.stdin.readline()
# Print the sum of both integer variables on a new line.
print(i + my_int)
# Print the sum of the double variables on a new line.
print(d + my_dbl)
# Concatenate and print the String variables on a new line
# The 's' variable above should be printed first.
print(s + my_str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment