Ken Schaefer
9 months ago
3 changed files with 30 additions and 1 deletions
@ -1,2 +1,9 @@ |
|||||||
states = ["Delaware", "Pennsylvania", "New Jersey", "Georgia", "Connecticut", "Massachusetts", "Maryland", "South Carolina", "New Hampshire", "Virginia", "New York", "North Corolina", "Rhode Island"] |
states = ["Delaware", "Pennsylvania", "New Jersey", "Georgia", "Connecticut", |
||||||
|
"Massachusetts", "Maryland", "South Carolina", "New Hampshire", |
||||||
|
"Virginia", "New York", "North Corolina", "Rhode Island"] |
||||||
|
print(states[0]) |
||||||
|
print(states[-1]) |
||||||
|
|
||||||
|
list.append("Illinois") |
||||||
|
list.extend("Tennessee, Kentucky") |
||||||
|
|
||||||
|
@ -0,0 +1,15 @@ |
|||||||
|
import string |
||||||
|
|
||||||
|
line1 = [" ", " ", " "] |
||||||
|
line2 = [" ", " ", " "] |
||||||
|
line3 = [" ", " ", " "] |
||||||
|
map = [line1, line2, line3] |
||||||
|
print("Hiding your treasure! X marks the spot.") |
||||||
|
position = input() # Where do you want to put your treasure |
||||||
|
|
||||||
|
col = position[0] |
||||||
|
row = position[1] |
||||||
|
|
||||||
|
map[string.ascii_lowercase.index(col)][int(row)-1] = 'X' |
||||||
|
|
||||||
|
print(f"{line1}\n{line2}\n{line3}") |
Loading…
Reference in new issue