👋 ආයුබෝවන් coders!
Python eken 3වෙනි padamata එන්න! ❤️
අද අපි බලමු Data Types කියන හැම එකක්ම!
මොකද variable එකකට දාන අගය එකෙන් එක වෙනස් වෙන්න පුළුවන් නෙ.
මොකක්ද මචන් variable එකක තියෙන දේවල්?
🧠 ඒක තමයි data type එක කියන්නේ — "මෙම variable එකේ value එක කෙරෙන්නේ කොහොමද?" කියන එක!
🧵 String කියන්නේ අකුරු, වචන, වාක්යය වගේ එකතුවක් — quotes ඇතුලේ ලියන්න ඕනෙ.
name = "Chamika" city = "Galle"
🖨️ print(name)
→ Chamika
📌 " " හෝ ' ' යන quotes වලට ඇතුලේ string එක තියන්න ඕනෙ.
🧮 මුළු අංක, decimal නැති ඒවාව තමයි Integer.
age = 25 year = 2025
🖨️ print(age)
→ 25
🚿 දශම (decimal) thiyena angka.
height = 5.9 weight = 68.5
🖨️ print(height)
→ 5.9
🟢 හෝ 🔴 විතරයි! True නැත්නම් False 😅
is_student = True is_tired = False
🧪 Python eken logical decisions ganna boolean tika use karanawa.
🔗 List – data tika ekathu karala tiyanna
colors = ["red", "green", "blue"]
🗂️ Dictionary – key:value format eken data store karanna
person = {"name": "Chamika", "age": 25}
💡 Ewa api inna lesson wala deep dive karamu machan. 😉
👇 ඔයාත් මේ data types tika try karapan:
my_name = "Chamika" my_age = 25 my_height = 5.8 is_cool = True print(my_name) print(my_age) print(my_height) print(is_cool)
💬 මේක output එක comment එකක් විදියට දාපං!
🥁 4වෙනි episode එකෙන් අපි input() function එකෙන් userගෙන් දත්ත ගන්න හදන්නෙ!
📢 Like, Comment, Share කරන්න අමතක කරන්න එපා machan.
Member since 2025-04-09 13:55:06
Comments
Please login to post a comment.
No comments yet. Be the first to comment!