Telegram Group & Telegram Channel
🎲#گام_به_گام

💻 کدنویسی

⬅️ دستورات پایه در پایتون: قسمت سوم

نام‌های متغیر
یک متغیر می‌تواند یک نام کوتاه (مانند x و y) یا یک نام توصیفی‌تر (سن، نام کار، کل‌حجم) داشته باشد.

🔣 قوانین برای متغیرهای پایتون:
🟡نام متغیر باید با یک حرف یا کاراکتر زیرخط شروع شود
🟡نام متغیر نمی‌تواند با یک عدد شروع شود
نام متغیر فقط می‌تواند شامل نویسه‌های عددی و زیرخط باشد (A-z، 0-9 و _ )
🟡نام متغیرها به حروف بزرگ و کوچک حساس هستند (age، Age و AGE سه متغیر متفاوت هستند)
🟡نام متغیر نمی‌تواند هیچ یک از کلمات کلیدی پایتون باشد.

◀️ مثال
متغیرهای درست:
myvar = "John"
my_var = "John"
_my_var = "John"
myVar = "John"
MYVAR = "John"
myvar2 = "John"
متغیرهای نادرست:
2myvar = "John"
my-var = "John"
my var = "John"

‼️ به یاد داشته باشید که نام متغیرها به حروف بزرگ و کوچک حساس هستند

📌 نام‌های متغیر چند کلمه‌ای
نام‌های متغیر با بیش از یک کلمه ممکن است به سختی خوانده شوند. چندین تکنیک وجود دارد که می‌توانید برای خوانایی بیشتر آنها استفاده کنید:

1️⃣ مورد شتر (Camel Case)
هر کلمه، به جز کلمه اول، با یک حرف بزرگ شروع می‌شود:
myVariableName = "John"

2️⃣ کیس پاسکال (Pascal Case)
هر کلمه با یک حرف بزرگ شروع می شود:
MyVariableName = "John"

3️⃣ کیس مار (Snake Case)
هر کلمه با یک کاراکتر زیر خط جدا شده است:
my_variable_name = "John"

👈 ادامه دارد....

#️⃣#کدنویسی
#️⃣#IDSchools
#️⃣#IDS
#️⃣#IDS_Math

✉️@IDSchools
✉️@IDS_Math
Please open Telegram to view this post
VIEW IN TELEGRAM



group-telegram.com/IDS_Math/103
Create:
Last Update:

🎲#گام_به_گام

💻 کدنویسی

⬅️ دستورات پایه در پایتون: قسمت سوم

نام‌های متغیر
یک متغیر می‌تواند یک نام کوتاه (مانند x و y) یا یک نام توصیفی‌تر (سن، نام کار، کل‌حجم) داشته باشد.

🔣 قوانین برای متغیرهای پایتون:
🟡نام متغیر باید با یک حرف یا کاراکتر زیرخط شروع شود
🟡نام متغیر نمی‌تواند با یک عدد شروع شود
نام متغیر فقط می‌تواند شامل نویسه‌های عددی و زیرخط باشد (A-z، 0-9 و _ )
🟡نام متغیرها به حروف بزرگ و کوچک حساس هستند (age، Age و AGE سه متغیر متفاوت هستند)
🟡نام متغیر نمی‌تواند هیچ یک از کلمات کلیدی پایتون باشد.

◀️ مثال
متغیرهای درست:
myvar = "John"
my_var = "John"
_my_var = "John"
myVar = "John"
MYVAR = "John"
myvar2 = "John"
متغیرهای نادرست:
2myvar = "John"
my-var = "John"
my var = "John"

‼️ به یاد داشته باشید که نام متغیرها به حروف بزرگ و کوچک حساس هستند

📌 نام‌های متغیر چند کلمه‌ای
نام‌های متغیر با بیش از یک کلمه ممکن است به سختی خوانده شوند. چندین تکنیک وجود دارد که می‌توانید برای خوانایی بیشتر آنها استفاده کنید:

1️⃣ مورد شتر (Camel Case)
هر کلمه، به جز کلمه اول، با یک حرف بزرگ شروع می‌شود:
myVariableName = "John"

2️⃣ کیس پاسکال (Pascal Case)
هر کلمه با یک حرف بزرگ شروع می شود:
MyVariableName = "John"

3️⃣ کیس مار (Snake Case)
هر کلمه با یک کاراکتر زیر خط جدا شده است:
my_variable_name = "John"

👈 ادامه دارد....

#️⃣#کدنویسی
#️⃣#IDSchools
#️⃣#IDS
#️⃣#IDS_Math

✉️@IDSchools
✉️@IDS_Math

BY ریاضی، آمار و علوم کامپیوتر - مدارس میان‌رشته‌ای


Warning: Undefined variable $i in /var/www/group-telegram/post.php on line 260

Share with your friend now:
group-telegram.com/IDS_Math/103

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

On December 23rd, 2020, Pavel Durov posted to his channel that the company would need to start generating revenue. In early 2021, he added that any advertising on the platform would not use user data for targeting, and that it would be focused on “large one-to-many channels.” He pledged that ads would be “non-intrusive” and that most users would simply not notice any change. At the start of 2018, the company attempted to launch an Initial Coin Offering (ICO) which would enable it to enable payments (and earn the cash that comes from doing so). The initial signals were promising, especially given Telegram’s user base is already fairly crypto-savvy. It raised an initial tranche of cash – worth more than a billion dollars – to help develop the coin before opening sales to the public. Unfortunately, third-party sales of coins bought in those initial fundraising rounds raised the ire of the SEC, which brought the hammer down on the whole operation. In 2020, officials ordered Telegram to pay a fine of $18.5 million and hand back much of the cash that it had raised. As such, the SC would like to remind investors to always exercise caution when evaluating investment opportunities, especially those promising unrealistically high returns with little or no risk. Investors should also never deposit money into someone’s personal bank account if instructed. The picture was mixed overseas. Hong Kong’s Hang Seng Index fell 1.6%, under pressure from U.S. regulatory scrutiny on New York-listed Chinese companies. Stocks were more buoyant in Europe, where Frankfurt’s DAX surged 1.4%. "There is a significant risk of insider threat or hacking of Telegram systems that could expose all of these chats to the Russian government," said Eva Galperin with the Electronic Frontier Foundation, which has called for Telegram to improve its privacy practices.
from de


Telegram ریاضی، آمار و علوم کامپیوتر - مدارس میان‌رشته‌ای
FROM American