Professional Documents
Culture Documents
Immutable != konstanta
Nama Literal/Nama
Variabel Variabel/Ekspresi
a 5678
_var 1.25
X1 "Berikan"
Var-1 = 'abc'
1x _var
X 1 a + 3
abc
"Hello" 5678
1234 "abc"
print( 5678 , 1234 ... )
_var 5678
a + _var _var
Variabel Prompt string
Penampung
a "Berikan masukan:"
_var = input( X1 )
X1 X1 + " masukan:"
A comment in a computer program is text that is intended only for
the human reader - it is completely ignored by the interpreter.
In Python, the # token starts a comment.
Three kinds of errors can occur in a program: syntax errors, runtime
errors, and semantic errors
Semantic errors ?
Syntax errors ?
2.1. Variables, Expressions and Statements
2.2. Values and Data Types
2.3. Type conversion functions
2.4. Variables
2.5. Variable Names and Keywords
2.6. Statements and Expressions
2.7. Operators and Operands
2.8. Input
2.9. Order of Operations
2.10. Reassignment
2.11. Updating Variables
https://youtu.be/1uQM-TVlaMo
Assisgment operator
Apa hasilnya ?
They can contain both letters and digits
they have to begin with a letter or an underscore
Bruce and bruce are different variables
Variable names can never contain spaces
The underscore character ( _) can also appear in a name.
It is often used in names with multiple words, such as my_name or price_of_tea_in_china
Salah
Apa hasilnya ?
Perhatikan
07/09/2020 19
Jangan lupa berlatih lagi
https://runestone.academy/runestone/static/AlproD3/index.html