Total Pageviews

Thursday, February 27, 2014

ស្វែងយល់អំពី Operator

ឡូអាOperator
មានទៅតាមផ្នែករបស់វា មាន Arithmetic, relational and logical operators។ យើងនឹងសិក្សា អំពីវាះ
Arithmetic Operators: វាមានដូចជាថ្នាក់ទី១ដែលយើងបានរៀនរួចហើយ
Operator                Description
+                                  Addition
-                                   Subtraction
*                                   Multiplication
/                                   Division
%                                 modulo
^                                  Exponent
_                                  Unary negation

Relational Operators                          
ប្រើសំរាប់ប្រៀបធៀប ឭក៏ លក្ខខ័ណ្ធ
Operator                Description
==                                Equality (to check for equal two values)
~=                                No equal
<                                  Less than
>                                  Greater than
<=                                Less than or equal to
>=                                Greater than or equal to

Logical Operators
មានចំនួន៣​ គឺ and or not           
Print Function
យើងប្រើវាដើម្បីអ្វី?
១. បង្ហាញ Print() statement
២. តេះកូដដែលបានសរសេរដោយប្រើ print function ក្នុងការCheck មើលមានError ដែរឭទេ
Ex: myName = “app dev”

Print (myName)

No comments:

Post a Comment