# Given a variable, x, that stores the value of any decimal number, write Python 
# code that prints out the nearest whole number to x.
# If x is exactly half way between two whole numbers, round up, so
# 3.5 rounds to 4 and 2.5 rounds to 3. You may assume x is not negative.

# Hint: The str function can convert any number into a string.
# eg str(89) converts the number 89 to the string '89'

# Along with the str function, this problem can be solved 
# using just the information introduced in unit 1.

# x = 3.14159 
# >>> 3 (not 3.0)
# x = 27.63 
# >>> 28 (not 28.0)
# x = 3.5 
# >>> 4 (not 4.0)

x = 3.14159
x=x+.5
# Adding 0.50 helps in rounding off
# e.g 3.14 + 0.50 = 3.64 - so the integer value of 3 still remains 3
# e.g 3.60 + 0.50 = 4.10 - so the integer value from 3 to 4
number = str(x)
point=number.find(".")
print (number[0:point])

# This problem was identified as 2 Star Difficulty Level 


