Download presentation
Presentation is loading. Please wait.
1
Introduction to Programming with Python
Displaying text Dileepa S. Rajapaksa| @dsrajapaksa Microsoft Virtual Academy
2
Displaying text Print Microsoft Virtual Academy
Last part Practice your language Microsoft Virtual Academy
3
මේ දේවල් වලට පරිගණකය භාවිතාකරලා තියෙනවාද?
පොතක් කියවන්න. යම් නිෂ්පාදනයක් ගැන දැනගන්න. ප්රශ්ණයකට විසඳුමක් දැනගන්න පියවරයන් දැන ගැනීමට. Last part Practice your language Microsoft Virtual Academy
4
බොහෝ පරිගණක වැඩසටහන් තොරතුරු සපයනවා
ඔබ දැනගතයුතු එක් සරල ඒ වගේම වැදගත් කරුණක්වන්නේ පරිගණක තිරය තුල Text එකක් Display කිරීම. No experience needed , if you have it is not a problem Microsoft Virtual Academy
5
Text එකක් Display කරන්න භාවිතාකරන්නේ Print statement එක
print('Hickory Dickory Dock! The mouse ran up the clock') print("Hickory Dickory Dock! The mouse ran up the clock") ඔබට single quotes හෝ double quotes භාවිතා කලහැකියි No experience needed , if you have it is not a problem Microsoft Virtual Academy
6
Demo Printing text Microsoft Virtual Academy
7
Single quotes හෝ Double quotes භාවිතයේ ප්රශ්ණයක් ප්රශ්ණයක් තියෙනවාද?
print("It's a beautiful day in the neighborhood") print('It's a beautiful day in the neighborhood') Display කරන්න යන text එකේ Double quotes හෝ Single quotes එකක් තිබෙනවානම් මේ ප්රශ්ණය මතුවෙනවා. Double quotes හා Single quotes වලින් එක් වර්ගයක් භාවිතා කිරීමට පුරුදු වෙන එක හොඳ පුරුද්දක්. Microsoft Virtual Academy
8
පේළි කිහිපයක් Print කිරීම
Microsoft Virtual Academy
9
පේළි කිහිපයක Display කිරීමට මොකක්ද කරන්නේ?
print statements කිහිපයක් භාවිතාකරන්න පුළුවන්. print('Hickory Dickory Dock!') print('The mouse ran up the clock') Microsoft Virtual Academy
10
අලුත් පේලි ආරම්භකිරීමට "\n" භාවිතාකරන්න පුළුවන්.
print('Hickory Dickory Dock!\nThe mouse ran up the clock') Microsoft Virtual Academy
11
Python trick: triple quotes!
print("""Hickory Dickory Dock! The mouse ran up the clock""") print('''Hickory Dickory Dock! The mouse ran up the clock''') String එකක් triple quotes අතර type කලොත් ඒ string එක ඒ type කරපු විදිහටම Print කරගන්න පුළුවන්. Microsoft Virtual Academy
12
Demo Printing text Microsoft Virtual Academy
13
එකම ගැටලුවක් | විසඳුම් කිහිපයක්
Microsoft Virtual Academy
14
මෙයින් වඩා හොඳ මොකක්ද? print('Hickory Dickory Dock!')
print('The mouse ran up the clock') print('Hickory Dickory Dock!\nThe mouse ran up the clock') print('''Hickory Dickory Dock! The mouse ran up the clock''')
15
Geek Tips එකම ප්රශ්ණයට විසඳුම් කිහිපයක් පවතින්න පුළුවන්.
එකම ප්රශ්ණයට විසඳුම් කිහිපයක් පවතින්න පුළුවන්. සමහර අවස්ථා වලදී ක්රමය එතරම්ම වැදගත් නැහැ.
16
Demo විකල්ප කිහිපයක් | එකම ප්රතිඵලයක් Microsoft Virtual Academy
17
Code එකක් වැඩ නොකලොත් Microsoft Virtual Academy
18
Programming වලදී තවත් එක් වැදගත් දෙයක්
වැරදි සිදුවීම සාමාන්ය දෙයක් . හැම Programmer කෙනෙක්ම Type කිරීමේ අත්වැරදි හා Code කිරීමේ අත්වැරදිසිදුකරනවා.
19
අපගේ අත්වැරදි හඳුනාගැනීම වැදගත්.
print(Hickory Dickory Dock) print('It's a small world') print("Hi there') prnit("Hello World!") print('Hickory Dickory Dock') print("It's a small world") print("Hi there") print("Hello World!")
20
ඔබට අභියෝගයක්… There once was a movie star icon
පහත දැක්වෙන Poem එක ඒ ආකාරයෙන්ම Display කිරීම සඳහා program එකක් ලියන්න. There once was a movie star icon who preferred to sleep with the light on. They learned how to code a device that sure glowed and lit up the night using Python!
21
Congratulations! දැන් ඔයාලට පුළුවන් තොරතුරු Display කරන්න පුළුවන් ආකාරයේ program එකක් හදන්න.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.