Code :
print(1+True)
Solution and Explanation:
In Python, True is treated as 1 when used in numeric operations. Therefore, 1 + True is equivalent to 1 + 1, and the result is 2.
So, the output of print(1 + True) will be:
2
Python Coding December 09, 2023 Python Coding Challenge No comments
print(1+True)
In Python, True is treated as 1 when used in numeric operations. Therefore, 1 + True is equivalent to 1 + 1, and the result is 2.
So, the output of print(1 + True) will be:
2
Free Books Python Programming for Beginnershttps://t.co/uzyTwE2B9O
— Python Coding (@clcoding) September 11, 2023
Top 10 Python Data Science book
— Python Coding (@clcoding) July 9, 2023
🧵:
Top 4 free Mathematics course for Data Science ! pic.twitter.com/s5qYPLm2lY
— Python Coding (@clcoding) April 26, 2024
Web Development using Python
— Python Coding (@clcoding) December 2, 2023
🧵:
0 Comments:
Post a Comment