资讯
Our game needs interesting people to speak to, so let's create one. You will see on line 57 of the code that we have a new function that handles a random villager.
To make your own games, you need to give the computer easy instructions to follow in a language it can understand – code.
Simply create a new .py file in the same folder as your main Python code. Then “import” that file as you now know how to do, then access the functions from within that module.
That’s how to create a file in Python, update it, rename it, and destroy it. The circle of life! Of course, this is only really scratching the surface of what you can accomplish with Python.
一些您可能无法访问的结果已被隐去。
显示无法访问的结果