|
🧠 Python Data Types කියන්නේ මොකක්ද? | 3වෙනි පාඩම 🔥

🧠 Python Data Types කියන්නේ මොකක්ද? | 3වෙනි පාඩම 🔥

technology programming
By Rasanjana 2025-04-17 16:16:36

👋 ආයුබෝවන් coders!

Python eken 3වෙනි padamata එන්න! ❤️

අද අපි බලමු Data Types කියන හැම එකක්ම!

මොකද variable එකකට දාන අගය එකෙන් එක වෙනස් වෙන්න පුළුවන් නෙ.


📦 Data Type කියන්නේ මොකක්ද?

මොකක්ද මචන් variable එකක තියෙන දේවල්?

  • අකුරු 😁 (like "Hello")
  • අංක 🧮 (like 25)
  • සත්‍ය/අසත්‍ය ⚖️ (True / False)

🧠 ඒක තමයි data type එක කියන්නේ — "මෙම variable එකේ value එක කෙරෙන්නේ කොහොමද?" කියන එක!


💬 1. String (අකුරු එකතුවක්)

🧵 String කියන්නේ අකුරු, වචන, වාක්‍යය වගේ එකතුවක් — quotes ඇතුලේ ලියන්න ඕනෙ.

name = "Chamika"
city = "Galle"

🖨️ print(name) → Chamika

📌 " " හෝ ' ' යන quotes වලට ඇතුලේ string එක තියන්න ඕනෙ.


🔢 2. Integer (මුළු අංක)

🧮 මුළු අංක, decimal නැති ඒවාව තමයි Integer.

age = 25
year = 2025

🖨️ print(age) → 25


🌊 3. Float (දශම අංක)

🚿 දශම (decimal) thiyena angka.

height = 5.9
weight = 68.5

🖨️ print(height) → 5.9


🔘 4. Boolean (True / False)

🟢 හෝ 🔴 විතරයි! True නැත්නම් False 😅

is_student = True
is_tired = False

🧪 Python eken logical decisions ganna boolean tika use karanawa.


🧪 Extra Types:


🔗 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. 😉


🧪 Challenge එක:

👇 ඔයාත් මේ 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 එකක් විදියට දාපං!

🔜 Next Episode:

🥁 4වෙනි episode එකෙන් අපි input() function එකෙන් userගෙන් දත්ත ගන්න හදන්නෙ!

📢 Like, Comment, Share කරන්න අමතක කරන්න එපා machan.



Rasanjana

Rasanjana

Member since 2025-04-09 13:55:06

Comments

Please login to post a comment.

No comments yet. Be the first to comment!