掌握Python [英] Mastering Python

查看:65
本文介绍了掌握Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

你能告诉我一下吗?我尝试用我的编程语言(C,Visual Basic,Java)编写代码,但最终我离开了它们,因为我发现编程很难,我只是被告知Python很容易。你可以请教一下如何掌握好python,这样我就不会再受挫了。我正在转向生物信息学。请告诉我我有什么问题?为什么我觉得编程很难?我如何改进python中的编程?

谢谢

解决方案

每种编程语言就像学习外语一样或乐器。第一种语言是最难的(特别是如果它是C),之后在你学习的每种语言之后,难度会逐渐下降。这是因为所有语言在很多方面都相似,有些语言与其他语言相似。


我经历了你现在经历的完全相同的步骤。问题是你必须找到你喜欢的语言。作为一个例子,python'的结构强迫你缩进,这会迫使你按顺序保持语法?这对我来说是一个优点。 python也是一种面向对象的语言,所以你只需要即插即用,你导入的任何东西都可以打包成一个像对象一样的文件,无论你从哪里导入它都可以用来做你想做的事情。


我学习python的建议是拿起一本书。我只是喜欢在我工作的时候坐在我旁边的参考书,以便我可以快速参考。您还可以使用以下在线书籍:


潜入Python(非常适合初学者的书及其免费)

http://diveintopython.org/


Orielly的书比其他人高出一步我强烈推荐他们。

如果你要去任何大学,他们最有可能订阅O rielly的Safari书籍,只需经过学校图书馆网站,计算机科学网站或研究网站。

Safari还有两周的免费会员资格,可以免费查看他们所有的图书两周,只需确保您在两周前退出该计划,或者他们向您收取订阅费。


还可以继续回到论坛,通过尝试帮助人们提问并阅读解决方案,你可以学到很多东西。


但最重要的是要有一个目标,比如你为自己设定的项目或挑战。假设您想制作一个程序,可以更轻松地将文件传输到另一台计算机或按名称组织您的mp3,无论如何。一套项目可以帮助您保持驾驭并在最后获得满足感。此外,它并不像是一件苦差事,因为你正在研究你想要工作的东西。


希望这会有所帮助,Google和论坛也是你最好的朋友。



每种编程语言都像学习外语或乐器一样。第一种语言是最难的(特别是如果它是C),之后在你学习的每种语言之后,难度会逐渐下降。这是因为所有语言在很多方面都相似,有些语言与其他语言相似。


我经历了你现在经历的完全相同的步骤。问题是你必须找到你喜欢的语言。作为一个例子,python'的结构强迫你缩进,这会迫使你按顺序保持语法?这对我来说是一个优点。 python也是一种面向对象的语言,所以你只需要即插即用,你导入的任何东西都可以打包成一个像对象一样的文件,无论你从哪里导入它都可以用来做你想做的事情。


我学习python的建议是拿起一本书。我只是喜欢在我工作的时候坐在我旁边的参考书,以便我可以快速参考。您还可以使用以下在线书籍:


潜入Python(非常适合初学者的书及其免费)

http://diveintopython.org/


Orielly的书比其他人高出一步我强烈推荐他们。

如果你要去任何大学,他们最有可能订阅O rielly的Safari书籍,只需经过学校图书馆网站,计算机科学网站或研究网站。

Safari还有两周的免费会员资格,可以免费查看他们所有的图书两周,只需确保您在两周前退出该计划,或者他们向您收取订阅费。


还可以继续回到论坛,通过尝试帮助人们提问并阅读解决方案,你可以学到很多东西。


但最重要的是要有一个目标,比如你为自己设定的项目或挑战。假设您想制作一个程序,可以更轻松地将文件传输到另一台计算机或按名称组织您的mp3,无论如何。一套项目可以帮助您保持驾驭并在最后获得满足感。此外,它并不像是一件苦差事,因为你正在研究你想要工作的东西。


希望这会有所帮助,谷歌和论坛也是你最好的朋友。



我希望这个家伙能够坚持下去。我加入后他最后一次访问了。 Dang!


EvanPMth提出了一些很好的观点。我最喜欢的是为自己设置一个项目 - 保持相当简单 - 并一直看到它。如果需要,你可以在这个论坛上获得帮助。


另一个建议是仔细阅读这个论坛上的一些主题,找出那些最初不需要外部包的线程,以及研究逻辑。有时,您可以在网上找到的代码片段在您的项目中非常有用。还有一个 - 使用Python IDE,如Pythonwin或Idle(还有许多其他)来编写和测试代码。 HTH。

Hi everyone,
Can you please advice me. I have tried writing codes in my programming languages(C, Visual Basic, Java) but eventually i left them because i found programming difficult, i was just told that Python is easy. Can u please advice on how to master python well so that i will not have to get frustrated again. I am moving to work in bioinformatics. Pls tell me what is wrong with me ? why do i find programming difficult ?How can i improve programming in python ?
Thanks

解决方案

Every programming language is like learning a foreign language or musical instrument. The first language is the hardest (especially if it was C) and after that the difficulty steadily goes down after each language you learn. This is because all languages are similar in many ways, some more then others.

I went through the exact same steps you?re going through now. The thing is that you have to find the language that you enjoy. As an example python''s structure forces you to indent which forces you to keep you syntax orderly? That was one of the plus sides for me. Also python is an object oriented language so you can just plug and play, and anything you import is package into a file like object that can be used to do what ever you want with it, no matter where you imported it from.

My suggestion in learning python is to either pick up a book. I just like having a reference book sit next to me while i work on stuff, so that i can refer to it quickly. You can also use online books such as:

Dive Into Python (Very good book for beginners and its free)
http://diveintopython.org/

Orielly''s books are a step above everyone else i highly recommend them.
Also if you are going to any college they most likely subscribe to O''rielly''s Safari books, just go through the schools either library website, computer science website, or research website.
Safari also has a two week free membership to view all their books for free for two weeks, just make sure you drop out of the program before two weeks or they charge you a subscription fee.

Also keep on going back to forums you can learn a lot, by trying to help people with questions and just reading solutions.

The biggest thing though is to have a goal in mind, such as a project or challenge you set for yourself. Say you want to make a program that makes it easier to transfer files to a different computer or organize your mp3s by name, whatever. A set project helps you to stay driven and is satisfying at the end. Plus it doesn?t feel like a chore to learn because you are working on something you wan to work on.

Hope this helps, also Google and forums are you best friend.


Every programming language is like learning a foreign language or musical instrument. The first language is the hardest (especially if it was C) and after that the difficulty steadily goes down after each language you learn. This is because all languages are similar in many ways, some more then others.

I went through the exact same steps you?re going through now. The thing is that you have to find the language that you enjoy. As an example python''s structure forces you to indent which forces you to keep you syntax orderly? That was one of the plus sides for me. Also python is an object oriented language so you can just plug and play, and anything you import is package into a file like object that can be used to do what ever you want with it, no matter where you imported it from.

My suggestion in learning python is to either pick up a book. I just like having a reference book sit next to me while i work on stuff, so that i can refer to it quickly. You can also use online books such as:

Dive Into Python (Very good book for beginners and its free)
http://diveintopython.org/

Orielly''s books are a step above everyone else i highly recommend them.
Also if you are going to any college they most likely subscribe to O''rielly''s Safari books, just go through the schools either library website, computer science website, or research website.
Safari also has a two week free membership to view all their books for free for two weeks, just make sure you drop out of the program before two weeks or they charge you a subscription fee.

Also keep on going back to forums you can learn a lot, by trying to help people with questions and just reading solutions.

The biggest thing though is to have a goal in mind, such as a project or challenge you set for yourself. Say you want to make a program that makes it easier to transfer files to a different computer or organize your mp3s by name, whatever. A set project helps you to stay driven and is satisfying at the end. Plus it doesn?t feel like a chore to learn because you are working on something you wan to work on.

Hope this helps, also Google and forums are you best friend.

I wish this guy had stuck around. He last visited 2 days after I joined. Dang!


EvanPMth made some excellent points. My favorite is to set a project for yourself - keep it fairly simple - and see it through to the end. You can get help on this forum if you need it.

Another suggestion is to peruse some of the threads on this forum, seeking out those that do not require external packages at first, and study the logic. Sometimes the code snippets you can find online can be very useful in your projects. One more - Use a Python IDE such as Pythonwin or Idle (there are many others) to write and test your code. HTH.


这篇关于掌握Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆