Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> 2z = 40 SyntaxError: invalid syntax >>> $x = 10 SyntaxError: invalid syntax >>> x Traceback (most recent call last): File "", line 1, in x NameError: name 'x' is not defined >>> x =6 >>> x_123 Traceback (most recent call last): File "", line 1, in x_123 NameError: name 'x_123' is not defined >>> x_123 =42 >>> x_123 42 >>> _word72_6 Traceback (most recent call last): File "", line 1, in _word72_6 NameError: name '_word72_6' is not defined >>> _word72_6 = '123' >>> _word_72_6 Traceback (most recent call last): File "", line 1, in _word_72_6 NameError: name '_word_72_6' is not defined >>> _word72_6 '123' >>> alongidentifier = 6 >>> a_long_identifier = 7 >>> a_long_identifier 7 >>> amount = 89 >>> rate = .06 >>> amouunt Traceback (most recent call last): File "", line 1, in amouunt NameError: name 'amouunt' is not defined >>> amount 89 >>> rate 0.06 >>> a long identifier SyntaxError: invalid syntax >>> complex_id = .56 >>> comple_id Traceback (most recent call last): File "", line 1, in comple_id NameError: name 'comple_id' is not defined >>> complex_id 0.56 >>> for = 8 SyntaxError: invalid syntax >>> print(6) 6 >>> eval(6 +42) Traceback (most recent call last): File "", line 1, in eval(6 +42) TypeError: eval() arg 1 must be a string, bytes or code object >>> eval('6 +42') 48 >>> 45//8 5 >>> 45/8 5.625 >>> 46//8 5 >>> 46%8 6 >>> x = 2 >>> y = 3+7/4 >>> y 4.75 >>> z = y*x >>> z 9.5 >>> x = x+1 >>> x 3 >>> print >>> big = 10 >>> small = 2 >>> big = small >>> small = big >>> big 2 >>> small 2 >>> big = 10 >>> small = 2 >>> temp = big >>> big = small >>> small = temp >>> big 2 >>> small 10 >>> big 2 >>> small 10 >>> big, small = big+4, small -2 >>> big 6 >>> small 8 >>> big, small = small, big >>> big 8 >>> small 6 >>> ==================== RESTART: D:\CSI31F18\convertmiles.py ==================== This program converts a distance in miles to the equivalent distance in kilometers. Enter the distance in miles that you want to convert: 5.8 The distance 5.8 in miles is equal to 9.338000000000001 in kilometers. >>> for k in range(6): print("Hello!") Hello! Hello! Hello! Hello! Hello! Hello! >>> list(range(6)) [0, 1, 2, 3, 4, 5] >>> for k in range(6): print(k, 3*k) 0 0 1 3 2 6 3 9 4 12 5 15 >>> x = 1 >>> for k in range(6): x = 2*x print(k, x) 0 2 1 4 2 8 3 16 4 32 5 64 >>> deposit = 100 >>> rate = .02 >>> deposit = deposit + deposit*rate >>> deposit 102.0 >>> deposit = deposit + deposit*rate >>> deposit 104.04 >>> for k in range(10): deposit = deposit*(1 + rate) >>> deposit 126.82417945625456 >>> ======================= RESTART: D:/CSI31F18/futval.py ======================= This program computes the future value of a 10 year investment. >>> round(deposit, -2) Traceback (most recent call last): File "", line 1, in round(deposit, -2) NameError: name 'deposit' is not defined >>> deposit = 126.82417 >>> round(deposit, -2) 100.0 >>> round(deposit, 3) 126.824 >>> round(deposit, 2) 126.82 >>> for k in range(10): rate = rate+1 print(rate) print("end") SyntaxError: unindent does not match any outer indentation level >>> ======================= RESTART: D:/CSI31F18/futval.py ======================= 1 1 1 1 1 1 1 1 1 1 End >>> ======================= RESTART: D:/CSI31F18/futval.py ======================= 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 End >>> 5% SyntaxError: invalid syntax >>> d = 2000 >>> d = d/(1.05) >>> d 1904.7619047619046 >>> d = d/(1.05) >>> d 1814.0589569160995 >>> dep = d >>> dep = dep*1.05 >>> dep 1904.7619047619046 >>> dep = dep*1.05 >>> dep 2000.0 >>>