Python函数,我应该如何开始编程。

huangapple go评论72阅读模式
英文:

Python fucntions , how I should started the programming

问题

关于Python的函数,我应该学习所有的组合吗,例如数学函数,以成为初级程序员?然后,对于Django开发人员,必须知道如何使用算法和子序列。还有最后一个问题,如果我想成为Python开发人员,应该从哪里开始?

我尝试了很多事情,比如通过Python创建Telegram机器人,因为对我来说这似乎很容易。我还从头学到了模块。

英文:

So, I have question about the functions of python. Should I learn all combinations , for example math function in order to be a Junior programmer. Then for django developer must know how to work with algorithms and subsequence. Also last question what should I begin with if I want to be a python developer.

I tried so many things like creating the telegram bots through the python because It is seemed to me easy. I have also learned from beginning untill module.

答案1

得分: 0

在我看来,学习编程语言的最佳方法是首先了解编程语言的工作原理和通用编程概念:你会发现适用于某种编程语言的概念通常也可以应用于其他编程语言。这是因为编程语言只是一种工具,用来告诉计算机要做什么。你可以用完全不同的词汇向计算机解释同样的事情。但即使词汇不同,这些词的含义仍然相同。

所以,这意味着如果你想学习Django,你可能对Web开发感兴趣。因此,如果你想学习Python + Django,我建议你先学习Web工作的基本组成部分。这些基本概念将帮助你理解特定编程概念或技术背后的想法(规范),有了这些知识,你就能够在满足该规范(实现)的任何语言中编写代码。

所以,关于你的问题,我不认为你应该知道如何在Python中使用所有数学函数,但至少应该知道它们的存在。你应该知道有用于计算对数、平方根等的函数。而且你不需要从头开始实现它们。现在,使用任何编程语言执行通用任务都非常容易,你可以通过Google或chatGPT来实现。因此,如果你需要实现一个非常特定的数学函数,很可能有人在其他地方已经编程实现过了。

这并不意味着我建议你滥用Python库而不理解其中的原理,而是你应该实现一些小示例,以熟悉从他人代码中“借用”的概念。例如,作为开发者,我很少编写用于对数据结构进行排序的代码。通常会有一个库函数可以为你完成这个任务。但如果该库函数不再起作用或者不完全满足我的需求,我可以实现自己的函数。也许我的代码不会像库中的代码那样优化,但因为我知道如何在Python中对列表进行排序,我可以告诉计算机如何在Python中对数据结构进行排序。所以,是的,我们开发者只不过是从自然语言到编程语言这样的形式语言的纯粹翻译者。

另一方面,回答你的另一个问题:

还有最后一个问题,如果我想成为Python开发者,应该从哪里开始?

如果你想成为Python开发者,你应该尽量多练习Python编程技能。一开始,你编写什么并不太重要,因为你将学习基本的知识。我实际上建议你参加一门Python课程,以学习其语法和特性。你可以在互联网上找到许多免费的在线选项。还有很多编程竞赛和问题,你可以测试自己的水平。在我看来,这是一个不错的选项,因为它包含了不同级别的问题

在学习了Python的基本概念并实施了一些项目之后,我建议你专注于你想要从事的开发类型。所以,如果你对Web开发感兴趣,开始学习Web概念并开始制作Web应用程序。

此外,如果你想成为开发者(不管是哪种编程语言),你必须学会Git。我建议你创建一个GitLab或GitHub帐户。

英文:

In my opinion, the best way to learn a programming language is learning first how programming languages work and programming generic concepts: You will see that the concepts that apply into a certain programming language are usually concepts that can be applied to other languages. This is because programming language are just a tool to explain to a computer what to do. You can explain the same thing to a computer with totally diferent words. But even if the words are different, meaning of those words remain the same.

So, this means that if you want to learn Django, you are probably into web development. So, if you want to learn Python + Django, I would suggest that you learn how the basic components of web work. Those basic concepts will make you understand the idea (specification) behind a certain programming concept or technology and with this knowledge you will be able to write code in any language that fulfills that specification (implementation).

So, regarding your question, I do not think that you should know how to use all the math functions in Python, but at least know that they exist. You should be able to know that there are functions to compute logarithms, square roots, etc. And that you do not need to implement them from scratch. Nowadays, doing generic stuff with any programming language is super easy with Google or chatGPT, so if you need to implement a very specific mathematical function, there is probably someone out there that programmed it before.

That does not mean that I recommend that you abuse Python library without understanding what is going on, but instead you should implement small examples to get familiarized with the concepts that you are borrowing from other's people code. For example, as a developer, I rarely write code to sort a data structure. Usually there is a library function that does it for you. But if that library function is not working anymore or it does not exactly what I need, I can implement my own function. Maybe my code will not be as optimized as the one in the library, but because I know how to sort a list and I know the Python syntax I would be able to tell the computer how to sort a data structure in Python. So, yeah, we developers are nothing more than mere translators from natural language to a formal language like a programming language.

On the other hand, answering to your other question:
> Also last question what should I begin with if I want to be a python
> developer.

If you want to become a Python developer you should practice your coding skills in Python as much as you can. In the beginning it does not matter very much what do you program since you will be learning basic stuff. I actually recommend that you take a Python course to learn its syntax and features. You can find a lot of free online options on the Internet. There are lots of coding competitions and problems where you can test your level. In my opinion, this is a good one since it has problems of different level.

After you learn the basic concepts of python and have implemented some projects I recommend that you specialize in the type of development that you want to do. So if you are into web development start learning web concepts and start doing web applications.

Also, if you want to be a developer (does not matter the programming language) you MUST learn git. I recommend that you create a gitlab or github account.

huangapple
  • 本文由 发表于 2023年6月8日 21:40:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76432473.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定