Telegram Group & Telegram Channel
Что выведет следующий код на Python?


a = 256
b = 256
c = 257
d = 257

print(a is b) # #1
print(c is d) # #2

print(True + True + True == 3) # #3
print(True is 1) # #4
print(False == 0) # #5
print(False is 0) # #6


🔢 Варианты ответа:

A)

True
True
True
True
True


B)

False
True
False
True
False


C)

False
True
False
True
False


D)

True
False
False
False
False


Правильный ответ: B

💡 Почему?
-
a is bTrue, потому что int от -5 до 256 кэшируются.
-
c is dFalse, число 257 не кэшируется.
-
True + True + True == 3True, более того, True == 1.
-
True is 1False — это разные типы (bool и int).
-
False == 0True, False is 0False.



tg-me.com/pro_python_code/1788
Create:
Last Update:

Что выведет следующий код на Python?


a = 256
b = 256
c = 257
d = 257

print(a is b) # #1
print(c is d) # #2

print(True + True + True == 3) # #3
print(True is 1) # #4
print(False == 0) # #5
print(False is 0) # #6


🔢 Варианты ответа:

A)

True
True
True
True
True


B)

False
True
False
True
False


C)

False
True
False
True
False


D)

True
False
False
False
False


Правильный ответ: B

💡 Почему?
-
a is bTrue, потому что int от -5 до 256 кэшируются.
-
c is dFalse, число 257 не кэшируется.
-
True + True + True == 3True, более того, True == 1.
-
True is 1False — это разные типы (bool и int).
-
False == 0True, False is 0False.

BY Python RU


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/pro_python_code/1788

View MORE
Open in Telegram


Python RU Telegram | DID YOU KNOW?

Date: |

How To Find Channels On Telegram?

There are multiple ways you can search for Telegram channels. One of the methods is really logical and you should all know it by now. We’re talking about using Telegram’s native search option. Make sure to download Telegram from the official website or update it to the latest version, using this link. Once you’ve installed Telegram, you can simply open the app and use the search bar. Tap on the magnifier icon and search for a channel that might interest you (e.g. Marvel comics). Even though this is the easiest method for searching Telegram channels, it isn’t the best one. This method is limited because it shows you only a couple of results per search.

How to Use Bitcoin?

n the U.S. people generally use Bitcoin as an alternative investment, helping diversify a portfolio apart from stocks and bonds. You can also use Bitcoin to make purchases, but the number of vendors that accept the cryptocurrency is still limited. Big companies that accept Bitcoin include Overstock, AT&T and Twitch. You may also find that some small local retailers or certain websites take Bitcoin, but you’ll have to do some digging. That said, PayPal has announced that it will enable cryptocurrency as a funding source for purchases this year, financing purchases by automatically converting crypto holdings to fiat currency for users. “They have 346 million users and they’re connected to 26 million merchants,” says Spencer Montgomery, founder of Uinta Crypto Consulting. “It’s huge.”

Python RU from ar


Telegram Python RU
FROM USA