SarkariResultess QA Bank

TypeError: unsupported operand type(s) for +: 'int' and 'str' का सही समाधान क्या है? Google पर developer को मिलने वाला सबसे उपयोगी समाधान क्या है?

Other 0 Views Verified
TypeError: unsupported operand type(s) for +: 'int' and 'str' का सही समाधान क्या है? Google पर developer को मिलने वाला सबसे उपयोगी समाधान क्या है?
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified Correct Answer

total = 10 + int('5')

total = 10 + int('5')
Additional Explanation
Operands को compatible type में convert करना होगा।
Verified

total = 10 + '5'

total = 10 + '5'
Additional Explanation
यह विकल्प सही समाधान नहीं है।
Verified

total = 10.append('5')

total = 10.append('5')
Additional Explanation
यह विकल्प सही समाधान नहीं है।
Verified

total = str(10) + 5

total = str(10) + 5
Additional Explanation
यह विकल्प सही समाधान नहीं है।