t15.trans 1.4 KB

12345678910111213141516171819202122232425262728
  1. Module(body=[Assign(targets=[Name(id='x',
  2. ctx=Store())],
  3. value=Num(n=1)),
  4. Assign(targets=[Name(id='t',
  5. ctx=Store())],
  6. value=Num(n=0)),
  7. While(test=Compare(left=Name(id='x',
  8. ctx=Load()),
  9. ops=[LtE()],
  10. comparators=[Num(n=5)]),
  11. body=[Assign(targets=[Name(id='t',
  12. ctx=Store())],
  13. value=BinOp(left=Name(id='t',
  14. ctx=Load()),
  15. op=Add(),
  16. right=Name(id='x',
  17. ctx=Load()))),
  18. Assign(targets=[Name(id='x',
  19. ctx=Store())],
  20. value=BinOp(left=Name(id='x',
  21. ctx=Load()),
  22. op=Add(),
  23. right=Num(n=1)))],
  24. orelse=[]),
  25. Print(dest=None,
  26. values=[Name(id='t',
  27. ctx=Load())],
  28. nl=True)])