반응형
# 🚨 Don't change the code below 👇
row1 = ["⬜️","⬜️","⬜️"]
row2 = ["⬜️","⬜️","⬜️"]
row3 = ["⬜️","⬜️","⬜️"]
map = [row1, row2, row3]
print(f"{row1}\n{row2}\n{row3}")
position = input("Where do you want to put the treasure? ")
# 🚨 Don't change the code above 👆
#Write your code below this row 👇
position_int = int(position)
column = position_int // 10
row = position_int % 10
map[row-1][column-1] = "X"
#Write your code above this row 👆
# 🚨 Don't change the code below 👇
print(f"{row1}\n{row2}\n{row3}")
반응형
'파이썬 > exercise' 카테고리의 다른 글
5-1. python 학생 평균키 구하기(for반복문 연습) (0) | 2023.01.04 |
---|---|
4-3. python 가위바위보 게임 (0) | 2023.01.04 |
4-1. python random module, 동전 앞 뒤 무작위 (0) | 2023.01.03 |
3-4 python treasure island (0) | 2022.12.27 |
3-3 python love calulator (0) | 2022.12.27 |