Skip to main content

Python Basic syntax

Python tutorial 02

print() ශිතය බාවිතය...

    යම් තොරතුරක් තිරය මත ප්‍රතිදානය කිරිමට මෙම ශිතය බාවිතා කරයි..

syntax :

        print(object(s), sep=separator, end=end, file=file, flush=flush)

 

print("hello world")
print('hello world')
print(''' hello world''')

 

Output:-

hello world
hello world
hello world


print("I don't like apple")
print("' I don't like apple ''')
print(' I don \'t like apple')


output:
I don't like apple
I don't like apple
I don't like apple

පයිතන් මූලපද ..(Python Key words)

පයිතන් පරිගනක භශාව විස්තර කිරිමට සදහා බාවිතා කරන පද පයිතන් මූල පද ලෙස හදුන්වයි.
මෙවා පයිතන්හි විචල්‍ය නාම ශිත නාම හා වෙනත් හදුන්වන සදහා බාවිතා කල නොහැක.

Keyword Description
and A logical operator
as To create an alias
assert For debugging
break To break out of a loop
class To define a class
continue To continue to the next iteration of a loop
def To define a function
del To delete an object
elif Used in conditional statements, same as else if
else Used in conditional statements
except Used with exceptions, what to do when an exception occurs
False Boolean value, result of comparison operations
finally Used with exceptions, a block of code that will be executed no matter if there is an exception or not
for To create a for loop
from To import specific parts of a module
global To declare a global variable
if To make a conditional statement
import To import a module
in To check if a value is present in a list, tuple, etc.
is To test if two variables are equal
lambda To create an anonymous function
None Represents a null value
nonlocal To declare a non-local variable
not A logical operator
or A logical operator
pass A null statement, a statement that will do nothing
raise To raise an exception
return To exit a function and return a value
True Boolean value, result of comparison operations
try To make a try...except statement
while To create a while loop
with Used to simplify exception handling
yield To end a function, returns a generator
 source : W3 school











Comments

Popular posts from this blog

wood joint - දැව මුට්ටු (dava muttu)

තනි දැති මූට්ටුව(single cogged joint) ද්විත්ව දැති මූට්ටුව(Double cogged joint) භාවිත:- පරාල අට්ටවාල සමග සම්බන්ද වනුයේ තනි හෝ දිවිත්ව දැති මුට්ටුවෙනි. තත්තුමලි අඩපලු මුට්ටුව(Dovetail halved joint) භාවිත:-පරාලය හා කරතලාදය අතර සම්බන්ධය අතිකිරිමට භාවිතා කරයි.. කිඹුල් කට /කයිනොක්කු මූට්ටුව(Scarf joint) භාවිත:-මුදුන් යටලි ,බිත්ති යටලි දිගින් මදිවු විට තවත්  කොටසක් මුට්ටු කිරිම සදහා යොදා ගනි. හැඩ මූට්ටුව(Splayed joint) භාවිත:-වඩිම්බු ලැලි දෙකක් මුට්ටු කිරිම සදහා යොදා ගනි. තව් කුඩුම්බි මූට්ටුව භාවිත:-උලුවහු කණු උලුවහු හිස් සමග  මුට්ටු කිරිම සදහා යොදා ගනි. පුල්ලුක්කු  මූට්ටුව මේ post  එක ඔයාලට වැදගත්    උනානම්  comments  දාගෙන යන්නත් අනෙත් යලුවන්ටත් බලන්න share  කරන්නත් අමතක කරන්න එපා... #dava muttu #දැව මූට්ටු #සිංහල #sinhala

Root truss (කාප්ප වහල-kappa vahala)

 1.ආන කුරැපා කාප්පය(queen post root truss) 2.තනි කුරුපා කාප්පය 3.රජ කුරුපා කාප්පය(king post roof truss) ICT ET SFT

SFT _ ක්ෂුද්‍ර ජිව විවිඩත්වය_Microbial Diversity

ක්ෂුද්‍ර ජීවී විවිධත්වය .... පියවි ඇසින් දැකිය නොහැකි ජීවීන්ර ක්ෂුද්‍ර ජීවීන් නම් වේ . ඇන්ටි වොන් ලීවන් හුක් නැමැත්තා විසින් ප්‍රථම වතාවට ක්ෂුද්‍ර ජීවීන් නිරීක්ෂණය කර ඇත . ක්ෂුද්‍ර ජීවීන්ගේ දේහ ප්‍රමාණය 0.1mm වඩා කුඩාය.මැනිය හැක්කේ um, nm වලිනි . ක්ෂුද්‍ර ජීවීන් ජීවත් වන ප්‍රදේශ (ක්ෂුද්‍ර ජීවීන් ජීවත් නො වන පරිසරයක් නොමැත .) පස,වාතය ,ජලය,ජීවී දේහ තුළ ,අධි ආම්ලික පරිසර, වල උණුදිය උල්පත් වල ද ජීවත් වේ . උණු දිය උල්පත් වල - Thermophilus aquaticas දැව ප්‍රදේශ වල - Pesudomonas spp ක්ෂුද්‍ර ජීවීන්ගේ සර්ව ව්‍යාප්තියට හේතු ප්‍රමාණයෙන් කුඩා වීම . ඕනෑම පරිසරයක ජීවත් වීමට හැකි වීම. ජනන කාලය අඩු වීම. අධික පරිවෘත්තීය වේගය. ස්වසන විවිධත්වය. පෝෂණ විවිධත්වය. අධික ප්‍රජනන වේගය . ක්ෂුද්‍ර ජීවීන්ගේ විවිධත්වය __ රූපීය විවිධත්වය පෝෂණය විවිධත්වය ස්වසන විවිධත්වය 1.රූපීය විවිධත්වය .... ක්ෂුද්‍ර ජිවින් 0.1mm වඩා කුඩාය. සියලු ජීවීන් නිරීක්ෂණය කිරීම සඳහා ආලෝක අන්වික්ෂය සුදුසු නොවේ. ඒ සඳහා ඉලෙක්ට්‍රෝන අණ්වීක්ෂය භාවිත කරයි . සුන්‍ය නෂ්ටික සෛල ව්‍යුහයන් 10um - 100um ප්‍රාග්න්‍යෂ