Trying to make a calculator

Hello, so I'm trying to build a Calculator in Python and I'm confused why it does this. So I wrote the following code:
x = float(input('Number1: '))
y = float(input('Number2: '))
print(x + y)
And it prints 4.0 as the answer and I want it to print 4 as the answer. What am i doing wrong?

11 comments · 67% upvoted · other discussions

comments

JackLogan007

Hey you are using floating point numbers try using int in the print statement

Some_Guy_At_Work55

replace float with int