Sampleoutputs$pythonquiz_1.py0Thegeneratedlistis:[5,7,-17,-3,13,12,6,0,11,3]Thelargestandsecondlargeststrictlynegativeintegersare-3and-17.Thesmallestandsecondsmalleststri...
Sample outputs
$ python quiz_1.py 0
The generated list is: [5, 7, -17, -3, 13, 12, 6, 0, 11, 3]
The largest and second largest strictly negative integers are -3 and -17.
The smallest and second smallest strictly positive integers are 3 and 5.
$ python quiz_1.py 1
The generated list is: [-11, 17, -15, -3, -12, 12, 9, 11, 5, -6]
The largest and second largest strictly negative integers are -3 and -6.
The smallest and second smallest strictly positive integers are 5 and 9.
$ python quiz_1.py 2
The generated list is: [-16, -14, -14, 4, -9, 0, -3, 19, -6, 19]
The largest and second largest strictly negative integers are -3 and -6.
The smallest and second smallest strictly positive integers are 4 and 19.
$ python quiz_1.py 3
The generated list is: [-4, 18, 15, -11, 4, 19, 11, 18, -15, 19]
The largest and second largest strictly negative integers are -4 and -11.
The smallest and second smallest strictly positive integers are 4 and 11.
$ python quiz_1.py 4
The generated list is: [-4, 0, -13, 6, 11, -10, -14, -15, -18, 6]
The largest and second largest strictly negative integers are -4 and -10.
The smallest and second smallest strictly positive integers are 6 and 11.
$ python quiz_1.py 5
The generated list is: [-3, 3, 14, -18, 10, -4, -16, -9, -12, 4]
The largest and second largest strictly negative integers are -3 and -4.
The smallest and second smallest strictly positive integers are 3 and 4.
$ python quiz_1.py 13
The generated list is: [-3, -1, -8, -5, -10, -5, -8, -11, -15, 15]
The largest and second largest strictly negative integers are -1 and -3.
There is only one strictly positive integer, 15.
$ python quiz_1.py 61
The generated list is: [12, -8, 16, -6, 1, -1, 1, -18, 12, 3]
The largest and second largest strictly negative integers are -1 and -6.
The smallest and second smallest strictly positive integers are 1 and 3
展开