Check the Numeric Type (Exercise)
Here’s a sample run of the program. In this case, the values the user provided are
.5. Because their difference is equal to exactly
1, the result is indeed a whole number. On the other hand, if the difference works out to be a fraction, then your program should reflect that by printing
False instead of
Become a Member to join the conversation.