If Statement Begin Property
If there is an "if" statement at the current line and tab, then the expression is updated to the "if" statement test
if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
if test:
- expression state at time t = "not_expr"
then the expression at time (t + 1) = test
When Python sees an "if" statement, Python first evaluates the test condition.
"not_expr" indicates that Python is not currently evaluating an expression.
For Example,
if the following are true:
- the line at time 0 = 1
- the tab at time 0 = 0
- statement at line 1, tab 0 =
if __eq__(3, 3):
- expression state at time 0 = "not_expr"
then the expression at time (0 + 1) = __eq__(3, 3)
Code Editor
LW Python State
Current Line | 1 | Current Tab | 0 | Time | 0 |
LW Python Simulator
Comments
Please log in to add comments