0
print(int(input("Enter a number: ")) + float (input("Enter another number: "))) why this code gives float type output?
different types using in same statement
1 Answer
+ 1
I think it's because adding a whole number and a number that has decimals will result in a number with decimals and you're not changing its type.