Skip to content

Commit f2417bc

Browse files
committed
Add type conversion
1 parent 3002789 commit f2417bc

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

data/python3-cheat-sheet.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,39 @@
7171
"definition": "Decrement: ডিক্রিমেন্ট"
7272
}
7373
]
74+
},
75+
{
76+
"title": "টাইপ কনভারসন (Type Conversion)",
77+
"items": [
78+
{
79+
"definition": "স্ট্রিং কে int নাম্বারে পরিবর্তন",
80+
"code": "int('15') → 15"
81+
},
82+
{
83+
"definition": "int নাম্বারের পরিবর্তনের ক্ষেত্রে বেইস এর ব্যবহার: উদাহরন ১ ও ২ এ যথাক্রমে বেইস ১৬ এবং বেইস ১০ ব্যবহার করা হয়েছে",
84+
"code": "উদাহরণ ১: int('3f', 16) → 63 উদাহরণ ২: int('123', 10) → 123"
85+
},
86+
{
87+
"definition": "দশমিকের পরের অংশের কর্তন",
88+
"code": "int(15.56) → 15"
89+
},
90+
{
91+
"definition": "float নাম্বারে পরিবর্তন",
92+
"code": "float('-11.24e8') → -1124000000.0"
93+
},
94+
{
95+
"definition": "round এর মাধ্যমে একটি দশমিক ভগ্নাশের দশমিকের পরের অংশের নম্বরের সংখ্যা কমিয়ে আনা হয়",
96+
"code": "round(15.56, 1) → 15.6"
97+
},
98+
{
99+
"definition": "বুলিয়ানে পরিবর্তন",
100+
"code": "bool(x) → উত্তর False হবে যদি x এর মান None অথবা '' (শূন্য স্ট্রিং) হয়, True হবে x এর অন্যান্য মান এর জন্যে"
101+
},
102+
{
103+
"definition": "স্ট্রিং এ পরিবর্তন",
104+
"code": "str(x) → '...' এখানের x এর যেকোন ভ্যালু স্ট্রিং এ রূপান্তরিত হবে"
105+
}
106+
]
74107
}
75108
]
76109
}

0 commit comments

Comments
 (0)