pimento[w05]$ atom while_flag.py pimento[w05]$ python3 while_flag.py You rolled a 4 and game over is False You rolled a 5 and game over is False You rolled a 1 and game over is False You rolled a 3 and game over is False You rolled a 6 and game over is True pimento[w05]$ python3 while_flag.py You rolled a 3 and game over is False You rolled a 3 and game over is False You rolled a 5 and game over is False You rolled a 4 and game over is False You rolled a 6 and game over is True pimento[w05]$ python3 while_flag.py You rolled a 6 and game over is True pimento[w05]$ python3 Python 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> lst1 = [5,3,7,10] >>> >>> lst1.append(15) >>> lst1 [5, 3, 7, 10, 15] >>> lst1.append(20) >>> lst Traceback (most recent call last): File "", line 1, in NameError: name 'lst' is not defined >>> lst1 [5, 3, 7, 10, 15, 20] >>> lst2 = [30,17] >>> >>> lst1 + lst2 [5, 3, 7, 10, 15, 20, 30, 17] >>> lst1 [5, 3, 7, 10, 15, 20] >>> lst2 [30, 17] >>> lst1 = lst1 + lst2 # classic accumulator >>> lst1 [5, 3, 7, 10, 15, 20, 30, 17] >>> lst1.remove() Traceback (most recent call last): File "", line 1, in TypeError: remove() takes exactly one argument (0 given) >>> lst1.remove(0) Traceback (most recent call last): File "", line 1, in ValueError: list.remove(x): x not in list >>> >>> lst1.remove(5) >>> lst1 [3, 7, 10, 15, 20, 30, 17] >>> >>> lst1 [3, 7, 10, 15, 20, 30, 17] >>> lst2 [30, 17] >>> >>> >>> lst3 = lst1 >>> >>> lst3 [3, 7, 10, 15, 20, 30, 17] >>> lst1 [3, 7, 10, 15, 20, 30, 17] >>> lst1[0] = 3 >>> >>> lst1[0] 3 >>> lst1[0] = 100 >>> lst1 [100, 7, 10, 15, 20, 30, 17] >>> >>> s = "swarthmore" >>> s[0] 's' >>> s[0] = "S" Traceback (most recent call last): File "", line 1, in TypeError: 'str' object does not support item assignment >>> lst3 [100, 7, 10, 15, 20, 30, 17] >>> >>> >>> >>> lst1 [100, 7, 10, 15, 20, 30, 17] >>> lst2 [30, 17] >>> >>> >>> lst1 [100, 7, 10, 15, 20, 30, 17] >>> lst3 [100, 7, 10, 15, 20, 30, 17] >>> lst3[4] = -20 >>> >>> lst3 [100, 7, 10, 15, -20, 30, 17] >>> lst1 [100, 7, 10, 15, -20, 30, 17] >>> s 'swarthmore' >>> t = s >>> t 'swarthmore' >>> t = t + "!" >>> t 'swarthmore!' >>> s 'swarthmore' >>> exit() pimento[w05]$ atom build_list.py pimento[w05]$ python3 build_list.py Before: [1, 5, -4, 13, -3, 7, 11, -3, 7, 8] After: [1, 5, 0, 13, 0, 7, 11, 0, 7, 8] pimento[w05]$ python3 build_list.py Enter a number for your list: 4 Enter a number for your list: -1 Enter a number for your list: Traceback (most recent call last): File "build_list.py", line 41, in main() File "build_list.py", line 33, in main num = int(input("Enter a number for your list: ")) ValueError: invalid literal for int() with base 10: '' pimento[w05]$ python3 build_list.py Enter a number for your list: 4 Enter a number for your list: -3 Enter a number for your list: 2 Enter a number for your list: -5 Enter a number for your list: 1 Before: [4, -3, 2, -5, 1] After: [4, 0, 2, 0, 1] pimento[w05]$