i
, d
, and s
i
plus your int variable on a new lined
plus your double variable to a scale of one decimal place on a new lines
with the string you read as input and print the result on a new line.1
2
3
4
5
6
7
8
9
10
11
12
13
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.
# Print the sum of both integer variables on a new line.
# Print the sum of the double variables on a new line.
# Concatenate and print the String variables on a new line
# The 's' variable above should be printed first.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/python3
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.
int_eger = input()
dou_ble = input()
str_ing = input()
# Print the sum of both integer variables on a new line.
print(i + int(int_eger))
# Print the sum of the double variables on a new line.
print(round(d + float(dou_ble),1))
# Concatenate and print the String variables on a new line
# The 's' variable above should be printed first.
print(s + str_ing)