The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

Basic Python Syntax – Introduction to Syntax and Operators

Basic Python Syntax – Introduction to Syntax and Operators

0
Votes
1
Answer

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 Answer

365 Team
0
Votes

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