Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
Sell your Land, House on idamata.lk for FREE
sajith.xp.pk
Updated:
Thursday at 9:03 AM
Handmade Character Soft Toys
anil1961
Updated:
Tuesday at 2:11 PM
Bodim.lk out now !
Manoj Suranga Bandara
Updated:
Jun 21, 2026
Power Lifting Lever Belt
SkullVamp
Updated:
Jun 13, 2026
Ad icon
port.lk Domain for sale
Lankan-Tech
Updated:
Jun 13, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
programming sinhalen igena ganna methanata enna
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="BXPUMA" data-source="post: 17700161" data-attributes="member: 458538"><p>Syntax ( කාරක රීති)</p><p>=====================</p><p></p><p>syntax කියන්නේ මොකක් හරි programming language එකක code එකක් ලියද්දි අපි පිළි ගන්න ඕනි නීති, රීති වලට. අනිත් language වලට සාපේක්ෂව python කියන්නේ very high level language එකක් (ඒ කියන්නේ ගොඩක් දියුණු පරිගණක භාෂාවක්). python අපිට ඕනෙම text editor software එකකින් හදාගන්න පුළුවන්. python වල brackets {} , semicolons ; වැඩිපුර භාවිතා වෙන්නේ නෑ. අපිට ඕනේ නම් command prompt එකේ පවා python file.py පාවිච්චි කරලා code එකක් run කර ගන්න පුළුවන්. අනිත් වාසිය තමයි අපිට python, compile කරන්න ඕනි නෑ. python කියන්නේ ඉතාම සරල programming language එකක්. ඒ වගේම python case sensitive lagnuage එකක්.( ඒ කියන්නේ simple, capital අකුරු නිවැරදිව යොදාගන්න ඕනි. උදාහරණයක් කිවොත් print කියන එකයි Print හෝ PrInT කියන ඒවා වෙනස් දේවල් විදියට තමා python දකින්නේ.) </p><p></p><p>Comments</p><p>==========</p><p></p><p>අනිත් language වගේම python වලත් comments යොදා ගන්නේ අපි ලියපු code එක විස්තර කරන්න. ගොඩක් වෙලාවට ලොකු code ලියන කොට, වෙන කව්රු හරි ලියපු code එකක් තේරුම් ගන්න හරිම අමාරුයි. එක නිසා අපි පොඩියට ඒ code එකෙන් මොකද්ද වෙන්නේ කියල ලියල තියෙනවා නම් එක අපිත් එක්ක වැඩකරන අනිත් අයට හරිම පහසුවක්. ඒ වගේම අපිට පස්සේ වෙලාවක code එක අපහු බලන කොට තේරුම් ගන්නත් ලේසි වෙනවා. comment යොදන එකෙන් අන්තිම program එකට කිසිම බලපෑමක් සිද්ද වෙන්නේ නෑ. ඒක නිසා comment යොදනවා කියන්නේ හොද පුරුද්දක්.</p><p></p><p>Python වල comment දාන්න පහල තියෙන syntax එක යොදා ගන්න පුළුවන්,</p><p></p><p>print("This is a test") #This is a comment.</p><p>#This is also a comment. There are no multi-line comments.</p><p></p><p>python වල comment එකක් ලියද්දි ඉස්සරහින් # ලකුණ දාල ලියන්න ඕනි. එතකොට python ඒක comment එකක් විදියට බාර ගන්නවා. ඔය උඩ තියෙන code එක run කරොත්. output එක විදියට This is a test කියල විතරයි එන්නේ. python වල ගොඩක් වෙලාවට multi-line comments භාවිත වෙනව අඩුයි.</p></blockquote><p></p>
[QUOTE="BXPUMA, post: 17700161, member: 458538"] Syntax ( කාරක රීති) ===================== syntax කියන්නේ මොකක් හරි programming language එකක code එකක් ලියද්දි අපි පිළි ගන්න ඕනි නීති, රීති වලට. අනිත් language වලට සාපේක්ෂව python කියන්නේ very high level language එකක් (ඒ කියන්නේ ගොඩක් දියුණු පරිගණක භාෂාවක්). python අපිට ඕනෙම text editor software එකකින් හදාගන්න පුළුවන්. python වල brackets {} , semicolons ; වැඩිපුර භාවිතා වෙන්නේ නෑ. අපිට ඕනේ නම් command prompt එකේ පවා python file.py පාවිච්චි කරලා code එකක් run කර ගන්න පුළුවන්. අනිත් වාසිය තමයි අපිට python, compile කරන්න ඕනි නෑ. python කියන්නේ ඉතාම සරල programming language එකක්. ඒ වගේම python case sensitive lagnuage එකක්.( ඒ කියන්නේ simple, capital අකුරු නිවැරදිව යොදාගන්න ඕනි. උදාහරණයක් කිවොත් print කියන එකයි Print හෝ PrInT කියන ඒවා වෙනස් දේවල් විදියට තමා python දකින්නේ.) Comments ========== අනිත් language වගේම python වලත් comments යොදා ගන්නේ අපි ලියපු code එක විස්තර කරන්න. ගොඩක් වෙලාවට ලොකු code ලියන කොට, වෙන කව්රු හරි ලියපු code එකක් තේරුම් ගන්න හරිම අමාරුයි. එක නිසා අපි පොඩියට ඒ code එකෙන් මොකද්ද වෙන්නේ කියල ලියල තියෙනවා නම් එක අපිත් එක්ක වැඩකරන අනිත් අයට හරිම පහසුවක්. ඒ වගේම අපිට පස්සේ වෙලාවක code එක අපහු බලන කොට තේරුම් ගන්නත් ලේසි වෙනවා. comment යොදන එකෙන් අන්තිම program එකට කිසිම බලපෑමක් සිද්ද වෙන්නේ නෑ. ඒක නිසා comment යොදනවා කියන්නේ හොද පුරුද්දක්. Python වල comment දාන්න පහල තියෙන syntax එක යොදා ගන්න පුළුවන්, print("This is a test") #This is a comment. #This is also a comment. There are no multi-line comments. python වල comment එකක් ලියද්දි ඉස්සරහින් # ලකුණ දාල ලියන්න ඕනි. එතකොට python ඒක comment එකක් විදියට බාර ගන්නවා. ඔය උඩ තියෙන code එක run කරොත්. output එක විදියට This is a test කියල විතරයි එන්නේ. python වල ගොඩක් වෙලාවට multi-line comments භාවිත වෙනව අඩුයි. [/QUOTE]
Insert quotes…
Verification
Dawasata paya keeyak thibeda?
Post reply
Top
Bottom