Telegram Group & Telegram Channel
ساختار شرطی در پایتون
توجه داریم، که elif در جایی به کار می رود که بخواهیم مجددا شرط دیگری را بررسی کنیم. اگر بخواهیم برای تمام حالت های باقیمانده تصمیم بگیریم از else استفاده می کنیم.
مثلا می خواهیم اگر اسم کاربر p1 یا p2 یا p3 بود پیام مناسب خود را دریافت کند و الا پیام خطا دریافت کند. حاصل چیزی شبیه زیر خواهد بود:
user = "p9"
if user=="p1":
print("welcome p1")
elif user=="p2":
print("welcome p2")
elif user=="p3":
print("welcome p3")
else:
print("Error, Anonymous")
#ساختار_شرطی
#آموزش_پایتون

#مقدمات

پایتون برای مالی در تلگرام https://www.tg-me.com/br/Python4Finance/com.python4finance

پایتون برای مالی در بله https://ble.im/br/Python4Finance/com.python4finance



tg-me.com/python4finance/38
Create:
Last Update:

ساختار شرطی در پایتون
توجه داریم، که elif در جایی به کار می رود که بخواهیم مجددا شرط دیگری را بررسی کنیم. اگر بخواهیم برای تمام حالت های باقیمانده تصمیم بگیریم از else استفاده می کنیم.
مثلا می خواهیم اگر اسم کاربر p1 یا p2 یا p3 بود پیام مناسب خود را دریافت کند و الا پیام خطا دریافت کند. حاصل چیزی شبیه زیر خواهد بود:
user = "p9"
if user=="p1":
print("welcome p1")
elif user=="p2":
print("welcome p2")
elif user=="p3":
print("welcome p3")
else:
print("Error, Anonymous")
#ساختار_شرطی
#آموزش_پایتون

#مقدمات

پایتون برای مالی در تلگرام https://www.tg-me.com/br/Python4Finance/com.python4finance

پایتون برای مالی در بله https://ble.im/br/Python4Finance/com.python4finance

BY Python4Finance




Share with your friend now:
tg-me.com/python4finance/38

View MORE
Open in Telegram


Python4Finance Telegram | DID YOU KNOW?

Date: |

The STAR Market, as is implied by the name, is heavily geared toward smaller innovative tech companies, in particular those engaged in strategically important fields, such as biopharmaceuticals, 5G technology, semiconductors, and new energy. The STAR Market currently has 340 listed securities. The STAR Market is seen as important for China’s high-tech and emerging industries, providing a space for smaller companies to raise capital in China. This is especially significant for technology companies that may be viewed with suspicion on overseas stock exchanges.

Dump Scam in Leaked Telegram Chat

A leaked Telegram discussion by 50 so-called crypto influencers has exposed the extraordinary steps they take in order to profit on the back off unsuspecting defi investors. According to a leaked screenshot of the chat, an elaborate plan to defraud defi investors using the worthless “$Few” tokens had been hatched. $Few tokens would be airdropped to some of the influencers who in turn promoted these to unsuspecting followers on Twitter.

Python4Finance from br


Telegram Python4Finance
FROM USA