Extra Credit


#1

I am sorta lost in this. How do I make the board change?

a = ('O O O O O O O O O O O O O O S S S S S O O O O O O O O O S S S S S S S O O O O O O O O S S S S S S S S O O O O O O S S S S S S S S S S S S S S S S S S S S S S S')

print(a)

x = int(input('Player 1, enter the starting location of your first city: '))
if(a[x] == 'S'):
print('That is in the ocean!')
else:
int(x)
print('Great')
a[x] = 'C'
print(a)


#2

The way it is written with parens () a is defined as a set and sets are immutable and unordered. You should still have your original board (which is a list of lists) and the code we built over the course of this module implements a way to change the board at any position.

Have you completed to module to get to this point?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.