Post

Coding Computing Coach
Coding Computing Coach@CodingComputing·
@Python_Dv Answer: D Solution: The `max` function internally works by comparing its inputs using the `<` operator. Here the max is being applied to 64, 65, 'A' Because the comparison between integers (64 and 65) and strings ("A") isn't supported, This gives a TypeError. NOTE: In C, +
English
0
0
0
324
Guardian Digital, Inc.
Guardian Digital, Inc.@gdlinux·
@Python_Dv The answer is D Why? Because Python got confused trying to compare apples (numbers) to oranges ('A'). It's like asking if a pizza is smarter than a smartphone. Python just shrugged and said, "Error!" 😂
English
0
0
0
74
Shikhar Srivastav
Shikhar Srivastav@Shikhar22380152·
@Python_Dv Error , because int and string are not comparable in python To compare both, atleast one datatype make same as another.
English
0
0
0
23
Prem Prakash
Prem Prakash@4EverPrem·
@Python_Dv TypeError. 64 & 65 are int type while A is str so cannot be compared to determine the max value.
English
0
0
0
77
Rakesh Das
Rakesh Das@RakeshDas_18·
@Python_Dv D. Error Reason: The max() function can't compare integers with strings. To fix it, ensure all elements are of the same type.
English
0
0
0
108
Paylaş