Constant Assignment Property 2

if the following are true:
  • the line at time t = i
  • the tab at time t = j
  • statement at line i, tab j = x = c
  • c is constant

then the line at time (t + 1) = i + 1

When Python executes a constant assignment statement, the line number is incremented by one. 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 = y = 64

then the line at time (0 + 1) = 1 + 1

Code Editor
LW Python State
Current Line1Current Tab0Time0
LW Python Simulator

Quiz (1 point)

Based on the Constant Assignment Property, please complete the following statement:

if the following are true:

  • the line at time 1 = 4
  • the tab at time 1 = 0
  • statement at line 4, tab 0 = z = 11

then at time = 1 + 1, line = 4 + __

Become a subscriber to save your progress, see the correct answer, and more!

Comments

Please log in to add comments