This is the presentation associated with the python type casting video.
Download Presentation
This is the question that was asked in the python Type Casting video
Question : What is the output of following code?
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-1-c312dc81eb3c> in <module>
2 num2 = "5"
3
----> 4 print("Sum =", int(num1)+int(num2))
ValueError: invalid literal for int() with base 10: '25.5'
© Copyright 2024 www.logicalpython.com. All rights reserved.
We constantly review Tutorials, references, and examples to avoid errors, but we cannot warrant full correctness
of all content.