+ 3

Pls help me out with this program . What will be its output and how ???

cat1="catF" cat2 = " catD " bool = cat1 > cat2 if bool = = True : print ( " fat cat " ) else : print ( " dead cat")

27th Sep 2018, 3:23 PM
Sourav kumar
Sourav kumar - avatar
4 Answers
27th Sep 2018, 3:34 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 2
Thanks .....
27th Sep 2018, 3:40 PM
Sourav kumar
Sourav kumar - avatar
+ 2
Answer: fat cat Explanation: If you use '==' operator to compare 1>2 or any number value then you will get the right answer. But of you compare string values then always you will get 'true' since it doest not compares the value. It only knows to compare high versus low that doesn't matters in any string value. Thanks
28th Sep 2018, 5:09 PM
Jai Verma
Jai Verma - avatar
0
yeah, its fat cat
27th Sep 2018, 7:44 PM
Alex Peach2000
Alex Peach2000 - avatar