Telegram Group & Telegram Channel
ساختار شرطی در پایتون
در صورتی که بخواهیم شروط مختلفی را ضمن یک ساختار شرطی بررسی کنیم از elif استفاده می کنیم. فرض کنیم می خواهیم نمره یک دانش آموز را در سه حالت بزرگتر از 10 مساوی 10 و کوچکتر از 10 مقایسه کنیم. حاصل چیزی شبیه به زیر خواهد بود:
grade=15
if grade > 10 :
print("Greater than 10")
elif grade == 10 :
print("equal to 10")
elif grade < 10 :
print("less than 10")
چند نکته: به ساختار تو رفتگی ها در دستور if دقت کنید. هر کدام از این تو رفتگی ها (که بعد از علامت : در خط قبل قرار دارد) یک بلوک را تشکیل می دهد.
برای مقایسه تساوی باید از == استفاده کنید (علامت = باعث ایجاد خطا می شود. = برای انتصاب است)
در صورتی که بخواهید ذیل یک شرط چندین خط کد بنویسید باید تو رفتگی را برای تمام خطوط آن بلوک رعایت نمایید.

#ساختار_شرطی
#آموزش_پایتون

#مقدمات

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

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



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

ساختار شرطی در پایتون
در صورتی که بخواهیم شروط مختلفی را ضمن یک ساختار شرطی بررسی کنیم از elif استفاده می کنیم. فرض کنیم می خواهیم نمره یک دانش آموز را در سه حالت بزرگتر از 10 مساوی 10 و کوچکتر از 10 مقایسه کنیم. حاصل چیزی شبیه به زیر خواهد بود:
grade=15
if grade > 10 :
print("Greater than 10")
elif grade == 10 :
print("equal to 10")
elif grade < 10 :
print("less than 10")
چند نکته: به ساختار تو رفتگی ها در دستور if دقت کنید. هر کدام از این تو رفتگی ها (که بعد از علامت : در خط قبل قرار دارد) یک بلوک را تشکیل می دهد.
برای مقایسه تساوی باید از == استفاده کنید (علامت = باعث ایجاد خطا می شود. = برای انتصاب است)
در صورتی که بخواهید ذیل یک شرط چندین خط کد بنویسید باید تو رفتگی را برای تمام خطوط آن بلوک رعایت نمایید.

#ساختار_شرطی
#آموزش_پایتون

#مقدمات

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

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

BY Python4Finance




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

View MORE
Open in Telegram


Python4Finance Telegram | DID YOU KNOW?

Date: |

Telegram Be The Next Best SPAC

I have no inside knowledge of a potential stock listing of the popular anti-Whatsapp messaging app, Telegram. But I know this much, judging by most people I talk to, especially crypto investors, if Telegram ever went public, people would gobble it up. I know I would. I’m waiting for it. So is Sergei Sergienko, who claims he owns $800,000 of Telegram’s pre-initial coin offering (ICO) tokens. “If Telegram does a SPAC IPO, there would be demand for this issue. It would probably outstrip the interest we saw during the ICO. Why? Because as of right now Telegram looks like a liberal application that can accept anyone - right after WhatsApp and others have turn on the censorship,” he says.

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.

Python4Finance from in


Telegram Python4Finance
FROM USA