Jump to content

How should I learn python

M0rph3us

Hello, I am currently a freshman in high school and was wanting to learn to code. I've looked around and I have concluded that python would be the best for me to learn first. I have the will to learn it but no one around me is tech savvy so I came here to ask how should I start. 

Link to comment
Share on other sites

Link to post
Share on other sites

I am in the same boat, I am currently teaching myself. When i was asking around and researching I kept coming back to this book:

https://www.amazon.com/Learn-Python-Hard-Way-Introduction/dp/0321884914/ref=sr_1_1?ie=UTF8&qid=1490799912&sr=8-1&keywords=learning+python+the+hard+way

I started not to long ago, I am on like chapter 20. However it is really helpful. I tried the whole Lynda.com thing and just didn't like it. However that is another option.

Link to comment
Share on other sites

Link to post
Share on other sites

Just visit the main page and use the help function and give yourself little challenges. Start with something small like a grocery list calculator or something like that. Use pretend numbers and your imagination as you build up different ideas.

 

For instance when I was in a programming class I had very vague requirements for a project. I played a lot of Diablo 3 back then and decided to create my own "damage calculator" depending on skills being used and weapons and gear.

 

Practice practice practice is the only way you'll learn and actually HOLD ON to what you learned, and that's the most important. You can watch endless youtube videos but w/o putting your youtube knowledge into action you will most likely forget it or not understand the concept.

Link to comment
Share on other sites

Link to post
Share on other sites

45 minutes ago, M0rph3us said:

Hello, I am currently a freshman in high school and was wanting to learn to code. I've looked around and I have concluded that python would be the best for me to learn first. I have the will to learn it but no one around me is tech savvy so I came here to ask how should I start. 

Me too

i like trains 🙂

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, willco60 said:

I am in the same boat, I am currently teaching myself. When i was asking around and researching I kept coming back to this book:

https://www.amazon.com/Learn-Python-Hard-Way-Introduction/dp/0321884914/ref=sr_1_1?ie=UTF8&qid=1490799912&sr=8-1&keywords=learning+python+the+hard+way

I started not to long ago, I am on like chapter 20. However it is really helpful. I tried the whole Lynda.com thing and just didn't like it. However that is another option.

Ok I'll check them out. Thanks

 

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, madknight3 said:

I recommend Automate The Boring Stuff. It's a free online book (or you can buy it) with videos to accompany the chapters. The official documentation is really useful as well so get familiar with that once you've got the basics down (they also have tutorials as well).

That book reminds me of this:

automation.png

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, madknight3 said:

I recommend Automate The Boring Stuff. It's a free online book (or you can buy it) with videos to accompany the chapters. The official documentation is really useful as well so get familiar with that once you've got the basics down (they also have tutorials as well).

Ok I'll check it out because the video with the book sounds useful...

Link to comment
Share on other sites

Link to post
Share on other sites

www.codeacademy.com for proficiency with syntax and basic knowledge of the specific language. I loved udacity Intro to Programming, but I think it has a cost know... or maybe not.. www.udacity.com

 

Online resources are pretty good because they tend to set up an environment for you to test out and practice the skill alongside learning it. Have you installed python? Linux, Max, or Windows?

Personal Rig:

[UPGRADE]

CPU: AMD Ryzen 5900X    Mb: Gigabyte X570 Gaming X    RAM: 2x16GB DDR4 Corsair Vengeance Pro    GPU: Gigabyte NVIDIA RTX 3070    Case: Corsair 400D    Storage: INTEL SSDSCKJW120H6 M.2 120GB    PSU: Antec 850W 80+ Gold    Display(s): GAOO, 现代e窗, Samsung 4K TV

Cooling: Noctua NH-D15    Operating System(s): Windows 10 / Arch Linux / Garuda

 

[OLD]

CPU: Intel(R) Core(TM) i5-6500 @ 3.2 GHz    Mb: Gigabyte Z170X-Gaming 3    RAM: 2x4GB DDR4 GSKILL RIPJAWS 4    GPU: NVIDIA GeForce GTX 960    Case: Aerocool PSG V2X Advance    Storage: INTEL SSDSCKJW120H6 M.2 120GB    PSU: EVGA 500W 80+ Bronce    Display(s): Samsung LS19B150

Cooling: Aerocool Shark White    Operating System(s): Windows 10 / Arch Linux / OpenSUSE

Link to comment
Share on other sites

Link to post
Share on other sites

15 hours ago, VicBar said:

www.codeacademy.com for proficiency with syntax and basic knowledge of the specific language. I loved udacity Intro to Programming, but I think it has a cost know... or maybe not.. www.udacity.com

 

Online resources are pretty good because they tend to set up an environment for you to test out and practice the skill alongside learning it. Have you installed python? Linux, Max, or Windows?

Yeah I have Been using code academy to get the basics until the book I ordered comes in

Link to comment
Share on other sites

Link to post
Share on other sites

22 hours ago, M0rph3us said:

I've looked around and I have concluded that python would be the best for me to learn first.

No, it would not. It is a horrible language, teaching you a horrible coding style. Please start with a sane language instead. My suggestions:

 

1. Start with Common Lisp!

 

Pros: Common Lisp, being a very mature language (first standardized in the 1980s), is quite unlikely to get major API breakages anytime soon, i.e. you won't have to adapt new language features every few years. It is basically an "executable lambda calculus", so it includes a lot of the shiny lambda and closure features other languages are still missing. The REPL allows you to gradually extend code which is currently running (i.e. modify your applications while using them). There are great and free books for it, e.g. Practical Common Lisp and Wikibooks. Paul Graham said that learning and using Lisp will make you a better programmer.

 

Similar to Python, Perl and other popular languages, there is a shitload of libraries you can just include and use. The language ecosystem is, despite of its age, alive and kicking. SLIME is probably the world's greatest IDE for any language. Performance-wise, certain Lisp implementations can even be faster than C. Code examples: See rosettacode.org.

 

Cons: Due to Lisp's unique approach, it will be hard for you to adapt any Lisp knowledge to non-Lisp languages. Don't worry, there are a lot of other Lisp languages, e.g. Clojure and Scheme. You can even script certain GNU applications like Emacs and The GIMP in a Lisp language. C-like languages are an entirely different thing though.

 

2. Start with Perl 5!

 

Pros: Perl 5 is an ubiquitous language, it is a part of the standard distribution of quite some operating systems so there is a good chance that you can start right away. Its legendary CPAN directory includes modules for quite anything. Perl inherits some of its specialties from shell scripts, so if you have ever used the shell of a Unix-like system, you might feel right at home. Perl 5 is also rather mature, currently being in its 24th release and still being maintained, so it is unlikely that you'll ever have to change your working code. As Perl is a pure scripting language (there is no official way to create a binary application with it), all it takes to modify your code is a text editor. There is no REPL though.

 

There is, of course, a good Wikibook for learning Perl. I've taught someone the basics of Perl within one week, so it is easy to adapt without any previous programming knowledge. Code examples are available on rosettacode.org again. As Perl uses certain constructs from C-like languages, you can even learn C, C++ etc. with your Perl knowledge later; also, PHP was initially based on Perl, so if you're interested in PHP, learning Perl might help you here.

 

Cons: Some people say that Perl's syntax reminds them of a swearing Donald Duck. Yes, there are a lot of symbols (@#$...) in a Perl script, helping you to understand what a certain variable is (array, hash, string, ...) and what it is not. - With Perl 6 (very) slowly replacing Perl 5, the advantage of having a very consistent package ecosystem may fade over the next decade.

 

3. Start with C!

 

Pros: C is everywhere. If your computer has an operating system, it (most likely) also has a C compiler, even on niche systems like RISC OS and Plan 9. Due to this fact, C has a library for anything, it can even be a great choice for web applications. As C's language core is often called a portable assembler, C code is usually translated to very efficient machine code, making your code do exactly what you expect it to without too much fiddling from your compiler or linker.

 

Cons: The learning curve of C is actually a vertical line. :) Seriously, C is not your friendly beginner's language, it basically punishes you for even the smallest mistakes. This could as well be a positive aspect though, you will learn to avoid sloppy coding. If you are afraid to jump into cold water, you might start with C++ instead, C++'s current revision C++17 is rather beginner-friendly and (almost) every valid C program is also a valid C++ program, so you are able to slowly turn your C++ code into C code while you learn the differences.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

On 29/3/2017 at 9:02 AM, M0rph3us said:

Hello, I am currently a freshman in high school and was wanting to learn to code. I've looked around and I have concluded that python would be the best for me to learn first. I have the will to learn it but no one around me is tech savvy so I came here to ask how should I start. 

-first and maybe THE MOST IMPORTANT, find a problem to solve, anything, I would send you to your math books, or any hard science, find a really boring thing that you could build a program to solve. Build a super cool calculator That is the best way to learn how to code.

-Lynda is a great place to get courses, the only drawback is the lack of a 3x playback speed

-python is a very very strict language, if you like rules and patterns is a great choice, if not RUN FROM IT, for now

-Perl on the other hand is way more chill and "free spirit"

-https://stackoverflow.com/ has many of the questions you will face already answered

- Don’t give up, even if you don't get at first, if Linus has proven something, sometimes the fourth attempt is the one

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

ok reading is great, but personally, watching and listening to someone is much easier - just register for a microsoft dev account (just type in an email) and use the free 3 months of pluralsight they give you - open another account when the the 3 months run out - go on plural sight and learn - one of the best places to learn that's basically free - plural sight was amazing for me in university

Link to comment
Share on other sites

Link to post
Share on other sites

On 30/3/2017 at 7:25 AM, Dat Guy said:

No, it would not. It is a horrible language, teaching you a horrible coding style. Please start with a sane language instead. My suggestions:

 

1. Start with Common Lisp!

 

Pros: Common Lisp, being a very mature language (first standardized in the 1980s), is quite unlikely to get major API breakages anytime soon, i.e. you won't have to adapt new language features every few years. It is basically an "executable lambda calculus", so it includes a lot of the shiny lambda and closure features other languages are still missing. The REPL allows you to gradually extend code which is currently running (i.e. modify your applications while using them). There are great and free books for it, e.g. Practical Common Lisp and Wikibooks. Paul Graham said that learning and using Lisp will make you a better programmer.

 

Similar to Python, Perl and other popular languages, there is a shitload of libraries you can just include and use. The language ecosystem is, despite of its age, alive and kicking. SLIME is probably the world's greatest IDE for any language. Performance-wise, certain Lisp implementations can even be faster than C. Code examples: See rosettacode.org.

 

Cons: Due to Lisp's unique approach, it will be hard for you to adapt any Lisp knowledge to non-Lisp languages. Don't worry, there are a lot of other Lisp languages, e.g. Clojure and Scheme. You can even script certain GNU applications like Emacs and The GIMP in a Lisp language. C-like languages are an entirely different thing though.

 

2. Start with Perl 5!

 

Pros: Perl 5 is an ubiquitous language, it is a part of the standard distribution of quite some operating systems so there is a good chance that you can start right away. Its legendary CPAN directory includes modules for quite anything. Perl inherits some of its specialties from shell scripts, so if you have ever used the shell of a Unix-like system, you might feel right at home. Perl 5 is also rather mature, currently being in its 24th release and still being maintained, so it is unlikely that you'll ever have to change your working code. As Perl is a pure scripting language (there is no official way to create a binary application with it), all it takes to modify your code is a text editor. There is no REPL though.

 

There is, of course, a good Wikibook for learning Perl. I've taught someone the basics of Perl within one week, so it is easy to adapt without any previous programming knowledge. Code examples are available on rosettacode.org again. As Perl uses certain constructs from C-like languages, you can even learn C, C++ etc. with your Perl knowledge later; also, PHP was initially based on Perl, so if you're interested in PHP, learning Perl might help you here.

 

Cons: Some people say that Perl's syntax reminds them of a swearing Donald Duck. Yes, there are a lot of symbols (@#$...) in a Perl script, helping you to understand what a certain variable is (array, hash, string, ...) and what it is not. - With Perl 6 (very) slowly replacing Perl 5, the advantage of having a very consistent package ecosystem may fade over the next decade.

 

3. Start with C!

 

Pros: C is everywhere. If your computer has an operating system, it (most likely) also has a C compiler, even on niche systems like RISC OS and Plan 9. Due to this fact, C has a library for anything, it can even be a great choice for web applications. As C's language core is often called a portable assembler, C code is usually translated to very efficient machine code, making your code do exactly what you expect it to without too much fiddling from your compiler or linker.

 

Cons: The learning curve of C is actually a vertical line. :) Seriously, C is not your friendly beginner's language, it basically punishes you for even the smallest mistakes. This could as well be a positive aspect though, you will learn to avoid sloppy coding. If you are afraid to jump into cold water, you might start with C++ instead, C++'s current revision C++17 is rather beginner-friendly and (almost) every valid C program is also a valid C++ program, so you are able to slowly turn your C++ code into C code while you learn the differences.

I don't agree (missclick).. Well I agree with all the info provided it's pretty good, but calling python horrible is just pure subjectivity. I understand you feel strongly about it so I don't wish to debate it.. But I'll instead give Pros about Python, feel free to then list the cons...

 

Python Pros:

1. Easy simple syntax:

Python is dynamically typed which means you don't have to declare variables so be able to use them. i.e. you don't need to write int i, string s, double d[20], because the interpreter does that for you. It can be a con for advanced programmers (lack of control) or working in large groups (complexity), but the pro is that for learning to program it lets you concentrate on the logic of a program, the understanding of the algorithm instead of what could be percieved as busy-work.

Also it makes for very "human-readable" code. Also indentation matters, so code blocks always look very organized and simple to understand. Understandably many progamers may hate this. (stockholm syndrome to brackets, IMHO { })

 

2. Lots of great Learning Material

Being the simple syntactical language it is many have chosen (as OP) to learn this language, maybe as a first step, and that has made for an abundance of great learning materials to start programming. Also many tutorials, and many computer science fundamentals are taught readily with python. There are many online interpreters so you can code through your browser. This is a big Pro.

 

3. Reach

I may be repeating myself but the fact that Python has seen such widespread adoption is again a Pro (not unique to Python, ofc, see Java). Python has many many packages to do anything you could want, the community is very big and works with it a lot. Python has lots of use in scientific research, data analysis, bioinformatics, server-side applications, networks, web-devel, etc.. It isn't the only option for any of it, but it is perfectly capable.

 

Anyway these are off the top of my head.. But I do understand the disadvantages it has believe me, (it's too slow, for example, for what I do). 

But I leave this here: OP once you have python running. Go into the python interpreter and:

import antigravity

You'll thank me later ;)

 

Personal Rig:

[UPGRADE]

CPU: AMD Ryzen 5900X    Mb: Gigabyte X570 Gaming X    RAM: 2x16GB DDR4 Corsair Vengeance Pro    GPU: Gigabyte NVIDIA RTX 3070    Case: Corsair 400D    Storage: INTEL SSDSCKJW120H6 M.2 120GB    PSU: Antec 850W 80+ Gold    Display(s): GAOO, 现代e窗, Samsung 4K TV

Cooling: Noctua NH-D15    Operating System(s): Windows 10 / Arch Linux / Garuda

 

[OLD]

CPU: Intel(R) Core(TM) i5-6500 @ 3.2 GHz    Mb: Gigabyte Z170X-Gaming 3    RAM: 2x4GB DDR4 GSKILL RIPJAWS 4    GPU: NVIDIA GeForce GTX 960    Case: Aerocool PSG V2X Advance    Storage: INTEL SSDSCKJW120H6 M.2 120GB    PSU: EVGA 500W 80+ Bronce    Display(s): Samsung LS19B150

Cooling: Aerocool Shark White    Operating System(s): Windows 10 / Arch Linux / OpenSUSE

Link to comment
Share on other sites

Link to post
Share on other sites

Python might be easy to learn, but so are Lisp and Perl (C can be a beast). Also, Python's approach to being a language for learners is still inferior than Pascal's. (I'll never understand why people prefer Python to Pascal either.) 

 

Neither Lisp nor Perl are statically typed and there are giant communities around them. And yes, my opinion is very personal - so is yours. 

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

MIT intro to CS teaches python (free online lectures) 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×