学习 Python 的项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4698234/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Projects to learn Python
提问by Andrew
I know this isn't a question about a specific snippet of code or anything, but here goes -
我知道这不是关于特定代码片段或任何东西的问题,但这里是 -
I've been messing around with the idea of learning Python since I'm pretty bored with PHP (and web development in general), but I can't think of any projects to help me learn. I've already worked through some of Project Euler with Python, but it's getting old. I know the basics, and I want to write something more fun that will introduce me to new things in Python.
我一直在纠结学习 Python 的想法,因为我对 PHP(以及一般的 Web 开发)感到很无聊,但是我想不出任何可以帮助我学习的项目。我已经使用 Python 完成了一些 Project Euler,但它已经过时了。我知道基础知识,我想写一些更有趣的东西,让我了解 Python 中的新事物。
Is there a cliche beginner project for Python? (for example, PHP's would be a blog or something similiar)
是否有一个陈词滥调的 Python 初学者项目?(例如,PHP 将是一个博客或类似的东西)
Are there any common Python projects for newcomers, or any uncommon ones that you'd suggest?
有没有适合新手的常见 Python 项目,或者您建议的任何不常见的项目?
Any ideas would help.
任何想法都会有所帮助。
采纳答案by Seth
回答by Amber
You could write a blog in Python just as easily as you could write a blog in PHP, if you use a framework like Django(so that you don't have to worry about the details of handling HTTP requests).
如果您使用像Django这样的框架(这样您就不必担心处理 HTTP 请求的细节),您可以像用 PHP 编写博客一样轻松地用 Python 编写博客。
Alternatively, you could mess around with things of a game-like graphics nature using Pygame.
或者,您可以使用Pygame 来处理类似游戏的图形性质的事情。
But really, "good" projects are the ones that you find interesting. Instead of asking "what can I write in Python," ask yourself "what do I want to write" first, and then after that, figure out how to do it in Python.
但实际上,“好”项目是您觉得有趣的项目。与其问“我可以用 Python 写什么”,不如先问自己“我想写什么”,然后再想办法用 Python 写什么。
回答by Apalala
If you go through the answers to these questions you'll find plenty of ideas:
如果您仔细阅读这些问题的答案,您会发现很多想法:
Learning python: simple functions to write
https://stackoverflow.com/questions/4697615/
https://stackoverflow.com/questions/4697615/
Solving the PythonChallenge had me thinking about how it would be easy to program something to watermark digital images in an secure and "invisible" way.
解决 PythonChallenge 问题让我开始思考如何轻松地以安全和“不可见”的方式对数字图像进行编程。
回答by Fillip
I always like to test my ability of a language by coding a virus. Their so many permutations to this concept, from making it morph with distribution to having it play annoying music.
我总是喜欢通过编写病毒来测试我的语言能力。他们对这个概念进行了如此多的排列,从让它随分布变化到让它播放烦人的音乐。
Just a warning, I would probably do this w/ virtual box, no sense in ruining your PC with a dumb accident (Unless you have a Mac in which case its fine!)
只是一个警告,我可能会用虚拟盒子来做这个,用愚蠢的事故破坏你的电脑是没有意义的(除非你有一台 Mac,在这种情况下它很好!)
回答by maco2605
回答by BartoszKP
Surprisingly no one mentioned CodingDojo. You can find there many simple problems which can be solved with any programming language and are excellent to focus on practising.
令人惊讶的是没有人提到CodingDojo。你会发现很多简单的问题可以用任何编程语言解决,非常适合专注于练习。
回答by devsaw
Pygame is pretty cool as you must have heard.Pick something like creating a starfield animation or make a game like Pong.
Pygame 非常酷,您一定听说过。选择创建星空动画或制作类似 Pong 之类的游戏。

