-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathday 01.py
More file actions
29 lines (27 loc) · 789 Bytes
/
day 01.py
File metadata and controls
29 lines (27 loc) · 789 Bytes
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
29
'''
# Day 1: Data Types
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(__dict__)
import sys
sys.exit(1)
newI = 0
newD = 0.0
newS = ""
try:
newI, newD, newS = int(input()), float(input()), input()
except:
print("Error - Data-type mismatch.")
else :
# Print the sum of both integer variables on a new line.
print(i + newI)
# Print the sum of the double variables on a new line.
print(d + newD)
# Concatenate and print the String variables on a new line
# The 's' variable above should be printed first.
print(s + newS)
'''
(lambda i, d, s: print( i+int(input()), d+float(input()), s+input(), sep='\n' )) ( 4, 4.0, 'HackerRank ' )