Objective
Create a Python program that receives any number of numbers as arguments and shows a summary. The arguments of each test are passed to the program as if you typed them in the terminal (they appear in the test cases).
Instructions
- Convert each argument of
sys.argv[1:]to an integer. If any is not a number, showInvalid argument: textand finish with exit code 2. - If there are no arguments, show
No numbers. - Otherwise show
Count: k,Sum: sandMaximum: m.
Count: 3
Sum: 27
Maximum: 15
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise