diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/1a.py | 8 | ||||
-rw-r--r-- | test/1b.py | 6 | ||||
-rw-r--r-- | test/1c.py | 5 | ||||
-rw-r--r-- | test/trailers.py | 13 |
4 files changed, 32 insertions, 0 deletions
diff --git a/test/1a.py b/test/1a.py new file mode 100644 index 0000000..69b3dc5 --- /dev/null +++ b/test/1a.py @@ -0,0 +1,8 @@ + +x = 2 +y = z + +def f(x, y): + return x + y + +print(f(5, 3) + x + y) diff --git a/test/1b.py b/test/1b.py new file mode 100644 index 0000000..a8324a0 --- /dev/null +++ b/test/1b.py @@ -0,0 +1,6 @@ +x = 2 ; y = 3 + +def f(x, x): + return x+y + +print(f(5,3)+ x + y) diff --git a/test/1c.py b/test/1c.py new file mode 100644 index 0000000..59e51e5 --- /dev/null +++ b/test/1c.py @@ -0,0 +1,5 @@ + +def mult(a, b): + return a * b + +print(mult(3, 2, 4)) diff --git a/test/trailers.py b/test/trailers.py new file mode 100644 index 0000000..278a2d4 --- /dev/null +++ b/test/trailers.py @@ -0,0 +1,13 @@ + +def mult(nums): + ret = [] + for a, b in nums: + ret.append(a * b) + return ret + +print(mult([(2, 4), (5, 2)])) + + +# left, right = 1, 2 +# print(left) +# print(right) |