Last answered:

10 Apr 2020

Posted on:

09 Apr 2020

0

Basic Python Syntax - Introduction to Syntax and Operators

Input: 10>10.0 Output: False   Why is it so? Is it because of the size of the data types, one being int and the other being float?
1 answers ( 0 marked as helpful)
Instructor
Posted on:

10 Apr 2020

0
Hi Neelanjan,  thanks for being a part of our courses! The reason you're getting a false when asking if 10 > 10.0 isn't to do with the types. It's because 10 is equal to 10.0. So, if you instead run : 10 == 10.0 you'd get a True response.   Cheers,  Eli

Submit an answer

GRAB 1 OF 200 ANNUAL PLANS UP TO
72% OFF