Advertisement
JkSoftware

Day 4 - Challenge Hide the treasure

Nov 7th, 2021
999
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #  Don't change the code below
  2. row1 = ["⬜️","⬜️","⬜️"]
  3. row2 = ["⬜️","⬜️","⬜️"]
  4. row3 = ["⬜️","⬜️","⬜️"]
  5. map = [row1, row2, row3]
  6. print(f"{row1}\n{row2}\n{row3}")
  7. position = input("Where do you want to put the treasure? \nHorizontal Row # then Vetical Row # seperated by a ,\nex: 1, 2\n")
  8. # Don't change the code above
  9.  
  10. #Write your code below this row
  11. position = position.split(", ")
  12. x = int(position[0])
  13. y = int(position[1])
  14. x -= 1
  15. y -= 1
  16. #print(x)
  17. #print(y)
  18. #print(map[y])
  19. row = map[y]
  20. #print(row)
  21. row[x] = "X"
  22. #print(row)
  23.  
  24.  
  25.  
  26.  
  27.  
  28. #Write your code above this row
  29.  
  30. #  Don't change the code below
  31. print(f"{row1}\n{row2}\n{row3}")
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement