When I first read the "Basic Python tutorial", I learned how to use Python?

Source: Internet
Author: User
I have never learned programming. I suddenly feel frustrated when I read the textbooks and read them. I don't rely on the IT industry to make a living, and I have missed the opportunity of professional training. But I don't want to give up my previous ideals. How can I remedy the problem of zero programming basics? Thank you! I have never learned programming. I suddenly feel frustrated when I read the textbooks and read them. I don't rely on the IT industry to make a living, and I have missed the opportunity of professional training. But I don't want to give up my previous ideals. How can I remedy the problem of zero programming basics? Thank you! Reply content: after reading the description of the subject, I can roughly understand the current status of the subject. I remember when I first started programming, I learned Java during my vacation because I was admitted to the software engineering major at the end of the college entrance examination. At that time, the status was similar to that of the subject, and I didn't know why the code was executed (I remember I went to Baidu to know the execution sequence of the program statements on question = _ = ), I don't know why to compile the program. Why are all programs written in the black box and double-click the program to run the program ...... Later, it took about half a year to complete. I accumulated some experience and shared it with the subject.

Method
If you are confused, do not consider the "idea" of programming. Read the code first. The code in the book is gradually increased from fewer to more. For every one in the book (every OH ~) For example, you need to understand the meaning of each keyword in each statement from start to end (the book explicitly states that you do not need to understand it ). Close the book and write the code that can implement the same function silently. At the same time, modify the code appropriately, such as deleting a line and adding a sentence to deepen understanding. 10 million Do not back up routines. As long as the functions are consistent, it makes no sense to stick to the goal even if you master the method, and it will not improve. After a while, with the deepening of understanding of the code, we will naturally understand the "idea" of writing programs 」. It is like writing an article (of course not well written) after learning the English syntax and memorizing the words ). After learning the first book, I tried to complete a small program independently, such as snake and Tetris. If python is used, I can try to write a small program for text processing. At this time, it is a good option to systematically consider "ideas. There are a lot of examples behind the book "Python basic tutorial", which is also a good time to write those instances.
In addition, there will certainly be a large number of terms at the beginning that cannot be understood. If you don't understand the terms, try to search them online. Do not accumulate too much; otherwise, it will easily lead to obstacles to understanding. This is also a learning process. Programming is not only about code, but also about other supporting knowledge. Some of them are not explained by specialized books and need to be accumulated by themselves.

Understanding
The idea of writing a program can be hard at ordinary times when you are a beginner (of course, it won't work in depth ). For example, you can write dumplings. py as follows:
# Introduce all the tools in the kitchen
Import kitchen
# The first three sentences are wrong. I accidentally mixed the syntaxes of other languages and corrected them. The term is enclosed in brackets.
# Here "meat stuffing 1" is a code name/name used to control/obtain variables. Just like remote control.
# "Method name (parameter 1, parameter 2,...)" indicates a series of parameters represented by "method name ".
# Operation/operation (here we do not know what it is ). Sometimes it produces a result (return value), and sometimes it does not.
# Here is some kind of meat. The first sentence can be interpreted:
# Using a name called "meat stuffing 1" (reference) to represent "Meat Cooking" using "pork" as "material (parameter )"
# Filling.
Meat stuffing 1 = meat stuffing (pork)
# "XX. YY" can be understood as "YY" of "XX". Below are the kitchen spices.
Seasoning 1 = kitchen. seasoning
# Same as the first sentence
Dough 1 = buy dough (money)

Dumpling skins = make dumpling skins (dough 1)
Raw dumplings = dumplings (dumplings, meat stuffing 1)

# "Def method name (parameter 1, parameter 2,...):" defines a sequence of commands, represented by "method name" to facilitate future needs
# Directly use it without having to write it repeatedly. This is also the definition of "meat stuffing" used above.
Def boiled dumplings (raw dumplings ):
# Generate a pot
Pot 1
Cook (raw dumplings, pot 1)
# This indicates that the code that is indented is repeatedly executed three times.
For times in [1, 2, 3]:
Add water (POT 1)
Cooked dumplings = cooking (POT 1)
# Return the final result
Return cooked dumplings

Cooked dumplings = boiled dumplings (raw dumplings)
# Output
Print cooked dumplings
The above is an example of daily life. However, some people are not very sensitive to such inappropriate metaphors. Let's add a mathematical perspective. In school mathematics class defines the function, and the concept of the function in the program is very similar, the specific difference here (http://www.zhihu.com/question/20385250 ). The method mentioned above is the function in the Program (Synonym ). In mathematics, we write as follows:
F (x, y, z) = x * 2 + y-z
M = f (x, y, z)
Writing Python code is
Def f (x, y, z ):
Return x * 2 + y-z

M = f (x, y, z)
Do you see the difference? I guess the program is written in mathematics. From this point of view, the program can be simply and roughly understood as an operational process described in a special language. It is similar to writing a math job in peacetime. However, some special statements such as "print" Hello world "are added. The idea is similar.
It can be seen as a step-by-step approach in the real world. This is called the process-oriented programming method ^_^. There is nothing to do after you get familiar with it, but it will be a little difficult at first. There is a habit process.

Finally, Python is a very friendly language and suitable for non-course beginners (of course, Python is also very powerful )~ The book "Python basics tutorial" is still good. It is the closest to zero-based book compared with similar books, so you can stick to it. As for nothing ...... Those code writers have been away from the masses for too long ...... The ghost knows what their zero base is ......

At first, it was a common phenomenon.
It is very interesting to write a program. I hope the subject can stick to his dream ~ The most important thing is step-by-step
Python tutorial-liao Xuefeng's official website
Reading a book is too heavy. I think what I said upstairs is not the key.
The key is that the book read by the subject is not suitable for beginners. In fact, it is a book for beginners who are hard-working and experienced people who are hard-working. That's right. It's a bad book. It's impossible to understand ththon2 floor. We recommend that you start from the book learn python the hard way. In addition, add a personal opinion. I am not a computer Major and prefer programming. I used tan haoqiang's C language basics when I was teaching C in school. I felt very boring when I was a beginner and thought it was very simple and useless, at last, the teacher assigned a small project and thought that the original learning could be used in this way. Suddenly open.

When I learned Java by myself, I used the Android development tutorial to learn it. I felt quite good. Later I met RoboCode and downloaded it from the plug-in, I feel that this experience of doing side training projects is very useful for programming. It is best to learn language and be able to do projects while learning.

In addition, I am also studying Python myself. However, in my junior year, I don't have a lot of extra-curricular time and I feel that the progress is very slow. I recommend a lovely python book here. It feels good to learn it through application requirements. This book is not very suitable for friends with 0 basics. I suggest you check it out.
Think about Python like a computer scientist
Python programming practices
Python core programming (version 2nd)

Learning programming is not just about grammar. You need to learn programming ideas and solutions to problems.
Otherwise there will be books that you can understand, but you cannot write code to solve the problem.

Read the article written by Huang ge.
How to crack the layer of python Programming
Article/pythonstudy. md at master · pythonpeixun/article · GitHub

Three languages: python2, php, and go
Article/jdstb. md at master · pythonpeixun/article · GitHub
A small piece of code illustrates the use of @ property decorators
A small piece of code illustrates the use of @ property decorators


How to crack the second layer of python Programming
How to crack the second layer of python Programming

How to crack the third layer of python Programming
How to crack the third layer of python Programming



Huangge python Remote Video Training Course
Article/index. md at master · pythonpeixun/article · GitHub

Yellow brother python Training Workshop video playback address
Article/python_shiping.md at master · pythonpeixun/article · GitHub

Come on! Communication is king.
The best way to learn by yourself at the beginning is to find a person who will join him, ask him what books he should read, and ask him if he doesn't understand anything.
Otherwise, you just find a textbook that everyone else agrees to, and you will inevitably encounter problems that are hard to solve.
Direct communication between people is more effective than one-way learning, such as reading books and watching videos.
Welcome to our classroom.
Http://crossin.me
: Crossincode
QQ group: 2959218160 basic words, it will take a while. When we were a computer, many of our 0-based students were also in the fog.
We recommend that you first read this introduction to computer science, mainly understanding the relationship between CPU and memory, the structure of von noriman, binary conversion, and number conversion.
Then, I personally think Java is more suitable for serving as the first language, because there is little hardware design. It is especially recommended for Head First Java, which is interesting and easy to understand.
Chinese computer textbooks are not very good, and their language is obscure and their concepts are outdated. First, the English version of the teaching material. The translation is also good, but professional words are often translated incorrectly. Teaching materials in China, especially those written by university professors, have the advantage that the basic teaching materials involve hardware and many partial points of examination.
Finally, let's talk about a learning experience. I can't understand a book. I should compare it with other authors who share the same content. It is easier to understand how different people express the same problem.
Wish you a smooth learning experience. Basic python tutorials are not recommended. It is recommended that you start from learning programming with your child. For the basic python tutorial, please note that the preface should be intended for beginners of python.
Maybe the book is wrong.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.