+ 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")
4 Answers
+ 10
output: fat cat
this page explains it: https://thepythonguru.com/JUMP_LINK__&&__python__&&__JUMP_LINK-strings/
+ 2
Thanks .....
+ 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
0
yeah, its fat cat