លំហសិក្សាកម្ពុជា លំហសិក្សាកម្ពុជា V1.0
ចូល ចុះឈ្មោះ

Python Sum

• Variables are like storage boxes: Think of a variable as a labeled container in your computer's memory. You give it a name and use the equal sign to store a value inside it. Python is smart enough to figure out what kind of data you put inside without you having to spell it out.
• The main data types we use: Depending on what you are storing, Python uses different types. We have whole numbers (integers) and decimals (floats), text in quotes (strings), and true/false values (booleans). We also look at groups of data like lists (which you can change), tuples (which stay the same), dictionaries (which use key-value pairs), and sets (unique items).
• Doing math and logic: You can do all kinds of basic operations. This includes standard math like addition, subtraction, multiplication, division, finding remainders, and exponents. You can also compare values to see if they are bigger or equal, run logical checks like "and" or "or", and check if an item belongs inside a list.
• Working with text (strings): Since we deal with text a lot, Python gives us great tools to modify it. You can glue strings together (concatenation), format messages using f-strings, check how long a sentence is with len(), grab specific letters using index numbers, or cut out slices of text. There are also built-in tricks to turn text uppercase or lowercase, clean up extra spaces, replace words, and split sentences into separate words.
ចែករំលែក
រក្សាទុក
ការផ្សព្វផ្សាយ
ការផ្សព្វផ្សាយ
មតិយោបល់ 0
ចូលគណនី ដើម្បីបញ្ចេញមតិ