We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ed16c8 commit d08bc5cCopy full SHA for d08bc5c
3. sys/exercise 4/README.md
@@ -0,0 +1,11 @@
1
+# Exercise 4
2
+
3
+Using the built-in sys module write a script that calculates the sum of the first two arguments.
4
5
+## Example
6
7
+```cmd
8
+$ python3 exercise.py 9 11
9
+20
10
11
+```
3. sys/exercise 4/exercise.py
@@ -0,0 +1 @@
+import sys
3. sys/exercise 4/solution.py
@@ -0,0 +1,5 @@
+if len(sys.argv) > 2:
+ result = int(sys.argv[1]) + int(sys.argv[2])
+ print(result)
0 commit comments