Follow the flow of execution in the following programs. For each one, predict what will happen in your notebook. Some examples may not show the correct syntax!
a_list = ['a', 'b', 'c', 'd', 'e']
print(a_list[0:3])
print(a_list[1:4])
a_list = ['a', 'b', 'c', 'd', 'e']
print(a_list[1:len(a_list) – 3])
a_list = ['a', 'b', 'c', 'd', 'e']
b_list = a_list.remove('b')
print(a_list)
print(b_list)
a_list = ['a', 'b', 'c', 'd', 'e']
b_value = a_list.pop()
print(a_list)
print(b_value)
a_list = ['a', 'b', 'c', 'd', 'e']
b_list = a_list + ['abc']
print(a_list)
print(b_list)
a_list = ['a', 'b', 'c', 'd', 'e']
b_list = a_list.append('f')
print(a_list)
print(b_list)
Create this game using lists and indexes, according to the following rules:
- The user will pick a location on the board according to this diagram (printed by the program):
1 | 2 | 3
-----------
4 | 5 | 6
-----------
7 | 8 | 9
- Depending on the position that the user inputs, update the corresponding list element to be an "X".
- Print the updated board out, but do not worry about making it look pretty.
- You only need to implement one turn of the game for now.