What will be the output of the following Python code print(“100+200”)?

The output of print(“100 + 200”) is 100 + 200

The reason is anything inside a double quotation in Python is a string. The print function prints the string as it is.

Let’s see some of the output of Python print

print("100 + 200") # 100 + 200
print('100' + '200') # 100200
print('100' + 200) # Error
print('100' * 2) # 100100
print('100' / 2) # Error
Facebook
Twitter
LinkedIn
Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

ABOUT ME !!
Johan William

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

RECENT POSTS

TEST