MCPcopy Create free account
hub / github.com/geekcomputers/Python / swap_temp_variable

Method swap_temp_variable

swap.py:48–57  ·  view source on GitHub ↗

Swaps the values of x and y using a temporary variable.

(self)

Source from the content-addressed store, hash-verified

46 self.display_values("After swapping")
47
48 def swap_temp_variable(self):
49 """
50 Swaps the values of x and y using a temporary variable.
51
52 """
53 self.display_values("Before swapping")
54 temp = self.x
55 self.x = self.y
56 self.y = temp
57 self.display_values("After swapping")
58
59 def swap_arithmetic_operations(self):
60 """

Callers 1

swap.pyFile · 0.80

Calls 1

display_valuesMethod · 0.95

Tested by

no test coverage detected