2021年4月30日星期五

How to use ord or a dictionary in python

I am making a simple game with turtle graphics and have a grid and want to send the turtle to a randomly selected x, y coordinates each time. I know I need to use to ord() or a dictionary to do this but I am stuck on how to implement it.

Here are the x, y coordinates (the x axis is 1,2,3 and the y axis is a,b,c etc) x = [-450, -350 ,-250, -150,-50, -50, 50, 150, 250, 350, 450] y = [-350, -250, -150, -50, 50, 150, 250, 350]

how do I put the coordinates above to match the grid?

any help appreciated!

https://stackoverflow.com/questions/67342252/how-to-use-ord-or-a-dictionary-in-python May 01, 2021 at 09:53AM

没有评论:

发表评论