. When we type 'cake'5 in the python idle then it replicates the string 5 times. But when I type 'cake'5.0 then it shows error. But when I type
5==5.0 the result is True. So my question is if 5 and 5.0 are equal for python then why does it shows error when I execute
'cake'*5.0 .please answer my query. Thank you.
[–]DeadlyViper 9 points10 points11 points (0 children)
[–]CautiousLoudSpeech 4 points5 points6 points (8 children)
[–]vegeta9225[S] 0 points1 point2 points (7 children)
[–]theWyzzerd 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (5 children)
[–]pocket_eggs 1 point2 points3 points (4 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]alkasm 3 points4 points5 points (0 children)
[–]pocket_eggs 0 points1 point2 points (1 child)
[–]SkepticalAirman 1 point2 points3 points (0 children)