លំហសិក្សាកម្ពុជា លំហសិក្សាកម្ពុជា V1.0
ចូល ចុះឈ្មោះ
Navuth Yada student NUM
អត្ថបទរបស់ yada navuth Default
2 អ្នកតាមដាន 3 កំពុងតាមដាន 2 អត្ថបទ
—
According to the lecture, the python programming break down into a few points such as: - Variables are like storage boxes: variable is like a labeled container in computer's memory. We 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 we 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 we can change), tuples (which stay the same), dictionaries (which use key-value pairs), and sets (unique items). - Doing math and logic: we can do all kinds of basic operations. This includes standard math like addition, subtraction, multiplication, division, finding remainders, and exponents. We 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. We 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.
2
អត្ថបទ
0
មាតិការង
2
អ្នកតាមដាន
អត្ថបទថ្មីៗ