Telegram Group & Telegram Channel
ساختار شرطی در پایتون
یکی از مهمتری کارها در هر فرآیندی ، بحث تصمیم گیری است. مثلا می خواهیم قیمت یک سهم را بررسی کنیم و اگر قیمت آن از اندازه مشخصی پایین تر آمد آن را بخریم. یا اینکه می خواهیم بر اساس نام یک سهم ، تحلیل خاصی انجام دهیم. همه این موارد از طریق ساختار شرطی قابل انجام است.
نتیجه یک شرط یا صحیح است (True) و یا غلط است (False) که در نتیجه یک مورد با مورد دیگر انجام می شود. البته می توان به یک متغیر به صورت دستی مقدار صحیح یا غلط را انتصاب داد.
فرض کنید یک متغیر x با مقدار مشخصی داریم. می خواهیم مقدار y را با مقدار x مقایسه کنیم و اگر هر دو متغیر برابر بودند پیامی را به کاربر نشان بدهیم. حاصل کار به صورت زیر خواهد بود:
x=10
y=10
if x==y:
print("Great, x=y")

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

#مقدمات

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

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



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

ساختار شرطی در پایتون
یکی از مهمتری کارها در هر فرآیندی ، بحث تصمیم گیری است. مثلا می خواهیم قیمت یک سهم را بررسی کنیم و اگر قیمت آن از اندازه مشخصی پایین تر آمد آن را بخریم. یا اینکه می خواهیم بر اساس نام یک سهم ، تحلیل خاصی انجام دهیم. همه این موارد از طریق ساختار شرطی قابل انجام است.
نتیجه یک شرط یا صحیح است (True) و یا غلط است (False) که در نتیجه یک مورد با مورد دیگر انجام می شود. البته می توان به یک متغیر به صورت دستی مقدار صحیح یا غلط را انتصاب داد.
فرض کنید یک متغیر x با مقدار مشخصی داریم. می خواهیم مقدار y را با مقدار x مقایسه کنیم و اگر هر دو متغیر برابر بودند پیامی را به کاربر نشان بدهیم. حاصل کار به صورت زیر خواهد بود:
x=10
y=10
if x==y:
print("Great, x=y")

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

#مقدمات

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

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

BY Python4Finance




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

View MORE
Open in Telegram


Python4Finance Telegram | DID YOU KNOW?

Date: |

Should I buy bitcoin?

“To the extent it is used I fear it’s often for illicit finance. It’s an extremely inefficient way of conducting transactions, and the amount of energy that’s consumed in processing those transactions is staggering,” the former Fed chairwoman said. Yellen’s comments have been cited as a reason for bitcoin’s recent losses. However, Yellen’s assessment of bitcoin as a inefficient medium of exchange is an important point and one that has already been raised in the past by bitcoin bulls. Using a volatile asset in exchange for goods and services makes little sense if the asset can tumble 10% in a day, or surge 80% over the course of a two months as bitcoin has done in 2021, critics argue. To put a finer point on it, over the past 12 months bitcoin has registered 8 corrections, defined as a decline from a recent peak of at least 10% but not more than 20%, and two bear markets, which are defined as falls of 20% or more, according to Dow Jones Market Data.

Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.Python4Finance from it


Telegram Python4Finance
FROM USA