4. Variables 0 of 12 activities solved
  1. Introduction Not yet read
  2. Variables and values Not yet read
  3. Variable names Not yet read
  4. Debugging variables Not yet read
  5. Soft typing Not yet read
  6. Shorthand operators Not yet read
  7. Comments Not yet read
  8. What you learned Not yet read
  9. Average of three values Not yet solved
  10. Area of a circle Not yet solved
  11. Number of coins Not yet solved
  12. Swap variables Not yet solved
Next series 5. Simple functions
4. Variables

Swap variables

Sign in to hand in your solution and get feedback.

# assign two integers to two variables a = 17 b = 23 # print values assigned to variables print(f'a = {a} en b = {b}') # swap two variables a += b # add two lines here to swap a and b # print values assigned to variables print(f'a = {a} en b = {b}')