Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> print('asdf', 'qwert') asdf qwert >>> print('asdf', 'qwer', end='') asdf qwer >>> ================================ RESTART ================================ >>> asdf qwer1234 >>> ================================ RESTART ================================ >>> b a c x d a e >>> ================================ RESTART ================================ >>> ['1458.32\n', '1697.55\n', '1289.66\n', '1896.35\n', '2105.63\n', '2011.35\n', '1964.22\n', '1765.33\n', '1845.77\n', '2203.58\n', '2105.36\n', '1862.36\n', '1752.01\n', '1691.02\n', '1664.36\n', '1964.25\n', '2007.85\n', '2236.36\n', '1904.52\n', '1652.32\n', '1964.22\n', '1765.33\n', '1476.32\n', '1845.77\n', '2203.58\n', '1520.36\n', '2105.36\n', '1862.36\n', '2652.10\n', '1963.85\n'] >>> data = ['1458.32\n', '1697.55\n', '1289.66\n', '1896.35\n', '2105.63\n', '2011.35\n', '1964.22\n', '1765.33\n', '1845.77\n', '2203.58\n', '2105.36\n', '1862.36\n', '1752.01\n', '1691.02\n', '1664.36\n', '1964.25\n', '2007.85\n', '2236.36\n', '1904.52\n', '1652.32\n', '1964.22\n', '1765.33\n', '1476.32\n', '1845.77\n', '2203.58\n', '1520.36\n', '2105.36\n', '1862.36\n', '2652.10\n', '1963.85\n'] >>> [float(v) for v in data] [1458.32, 1697.55, 1289.66, 1896.35, 2105.63, 2011.35, 1964.22, 1765.33, 1845.77, 2203.58, 2105.36, 1862.36, 1752.01, 1691.02, 1664.36, 1964.25, 2007.85, 2236.36, 1904.52, 1652.32, 1964.22, 1765.33, 1476.32, 1845.77, 2203.58, 1520.36, 2105.36, 1862.36, 2652.1, 1963.85] >>> ================================ RESTART ================================ >>> >>> ================================ RESTART ================================ >>> Please enter filename: Sales_Amounts.txt The total is: $56437.420000 The average per day is: $1881.247333 >>> ================================ RESTART ================================ >>> Please enter filename: Sales_Amounts.txt The total is: $56437.42 The average per day is: $1881.25 >>> int('cat') Traceback (most recent call last): File "", line 1, in int('cat') ValueError: invalid literal for int() with base 10: 'cat' >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "C:/Users/mil28/Desktop/factorial.py", line 8, in factorial('vat') File "C:/Users/mil28/Desktop/factorial.py", line 3, in factorial for i in range(1, num+1): TypeError: Can't convert 'int' object to str implicitly >>> ================================ RESTART ================================ >>> >>> ================================ RESTART ================================ >>> 1 >>> ================================ RESTART ================================ >>> 120 1 Traceback (most recent call last): File "C:/Users/mil28/Desktop/factorial.py", line 16, in print(factorial(-1)) File "C:/Users/mil28/Desktop/factorial.py", line 6, in factorial raise ValueError('Number must be a positive integer.') ValueError: Number must be a positive integer. >>> ================================ RESTART ================================ >>> 120 1 Traceback (most recent call last): File "C:/Users/mil28/Desktop/factorial.py", line 16, in print(factorial(-1)) File "C:/Users/mil28/Desktop/factorial.py", line 6, in factorial raise ValueError('Number must be a positive integer.') ValueError: Number must be a positive integer. >>> ================================ RESTART ================================ >>> 120 1 Traceback (most recent call last): File "C:/Users/mil28/Desktop/factorial.py", line 17, in print(factorial(-1)) File "C:/Users/mil28/Desktop/factorial.py", line 6, in factorial raise ValueError('Number must be a positive integer.') ValueError: Number must be a positive integer. >>> ================================ RESTART ================================ >>> 120 1 caught value error here Traceback (most recent call last): File "C:/Users/mil28/Desktop/factorial.py", line 23, in print(factorial('cat')) File "C:/Users/mil28/Desktop/factorial.py", line 3, in factorial raise TypeError('Only integers are accepted for factorial.') TypeError: Only integers are accepted for factorial. >>> ================================ RESTART ================================ >>> 120 1 caught value error here >>> ================================ RESTART ================================ >>> 120 1 caught value error here caught type error >>> ================================ RESTART ================================ >>> 120 1 ('Number must be a positive integer.', -1) Number must be a positive integer. ('Number must be a positive integer.', -1) here caught type error >>> ================================ RESTART ================================ >>> 120 1 120 Only integers are accepted for factorial. Only integers are accepted for factorial. ('Only integers are accepted for factorial.',) here caught type error >>>