-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhackerrank-challenge2day.py
28 lines (24 loc) · 1.09 KB
/
hackerrank-challenge2day.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
Complete the code in the editor below. The variables , , and are already declared and initialized for you. You must:
Declare variables: one of type int, one of type double, and one of type String.
Read lines of input from stdin (according to the sequence given in the Input Format section below) and initialize your variables.
Use the operator to perform the following operations:
Print the sum of plus your int variable on a new line.
Print the sum of plus your double variable to a scale of one decimal place on a new line.
Concatenate with the string you read as input and print the result on a new line.
"""
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.
number = int(input())
decimal = float(input())
string = input()
# Print the sum of both integer variables on a new line.
print(i + number)
# Print the sum of the double variables on a new line.
print(d + decimal)
# Concatenate and print the String variables on a new line
print(s+string)
# The 's' variable above should be printed first.