Tracing

Trace manually these program pieces.

  1. a = 5
    b = 13
    c = a+b
    a = a-b
    b = b-2*a+ c
    c = round(10/3, 2)
    
  2. a = -5.3
    b = int(a)
    b = float(b)
    a = a-b
    b = str(b)
    
  3. x = 3
    y = 4
    a = x > y
    b = a and x < y
    a = a or x >= y
    b = a and b
    a = a or False
    b = (a and False) or (b or a)
    
  4. Trace the previous program piece replacing the two first assignments by:

    x = 4
    y = 3
    
  5. Trace the previous program piece replacing the two first assignments by:

    x = 4
    y = x