🔣مختلط اعداد مختلط با یک "j" به عنوان قسمت موهومی نوشته می شوند: 🟣 مثال x = 3+5j y = 5j z = -5j
print(type(x)) print(type(y)) print(type(z)) خروجی پایتون: <class 'complex'> <class 'complex'> <class 'complex'> 🔣 تبدیل نوع می توانید با متدهای ()int()، float و ()complex یک نوع را به نوع دیگر تبدیل کنید: 🟣 مثال x = 1 # int y = 2.8 # float z = 1j # complex
❗️توجه: نمی توانید اعداد مختلط را به نوع اعداد دیگری تبدیل کنید.
🔣عدد تصادفی پایتون یک تابع تصادفی () برای ساخت یک عدد تصادفی ندارد، اما پایتون یک ماژول داخلی به نام random دارد که میتوان از آن برای ساخت اعداد استفاده کرد:
🟣 مثال ماژول تصادفی را وارد کنید و یک عدد تصادفی بین 1 و 9 نمایش دهید: import random
🔣مختلط اعداد مختلط با یک "j" به عنوان قسمت موهومی نوشته می شوند: 🟣 مثال x = 3+5j y = 5j z = -5j
print(type(x)) print(type(y)) print(type(z)) خروجی پایتون: <class 'complex'> <class 'complex'> <class 'complex'> 🔣 تبدیل نوع می توانید با متدهای ()int()، float و ()complex یک نوع را به نوع دیگر تبدیل کنید: 🟣 مثال x = 1 # int y = 2.8 # float z = 1j # complex
❗️توجه: نمی توانید اعداد مختلط را به نوع اعداد دیگری تبدیل کنید.
🔣عدد تصادفی پایتون یک تابع تصادفی () برای ساخت یک عدد تصادفی ندارد، اما پایتون یک ماژول داخلی به نام random دارد که میتوان از آن برای ساخت اعداد استفاده کرد:
🟣 مثال ماژول تصادفی را وارد کنید و یک عدد تصادفی بین 1 و 9 نمایش دهید: import random
Perpetrators of such fraud use various marketing techniques to attract subscribers on their social media channels. Pavel Durov, a billionaire who embraces an all-black wardrobe and is often compared to the character Neo from "the Matrix," funds Telegram through his personal wealth and debt financing. And despite being one of the world's most popular tech companies, Telegram reportedly has only about 30 employees who defer to Durov for most major decisions about the platform. In this regard, Sebi collaborated with the Telecom Regulatory Authority of India (TRAI) to reduce the vulnerability of the securities market to manipulation through misuse of mass communication medium like bulk SMS. Andrey, a Russian entrepreneur living in Brazil who, fearing retaliation, asked that NPR not use his last name, said Telegram has become one of the few places Russians can access independent news about the war. The Dow Jones Industrial Average fell 230 points, or 0.7%. Meanwhile, the S&P 500 and the Nasdaq Composite dropped 1.3% and 2.2%, respectively. All three indexes began the day with gains before selling off.
from jp