C++ vs python

I already learnt and have a pretty good grasp of java and objective c(iphone programming)

Which would be beneficial to learn next? Python or c++?
Im a current senior in high school.

Thanks

C++. It is one of the most used languages for good reason and is what many classes in most CS majors are taught in.

@guineagirl96 ok thanks

According to Code Eval Python is the most used language by far and away It is used by 31.2 per cent of the people. C++ is a distant third at 9.8. Python has been number one for a number of years

^^^ If you read what the Code Eval site says, Python is the most popular language for the programming challenges on that particular website.

Overall Java is the most used language, and C++ still has more users than Python.

Python is definitely growing fast, though.

How about fundamentals of computer science?

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/
http://cs61a.org/
http://cmsc-16100.cs.uchicago.edu/2015/
https://cs.brown.edu/courses/csci0170/

@ucbalumnus thanks but i already know the basics of programming. Once you learn them, they are the same in each language. Its the syntax that changes plus some other minor changes
I know everything up to data structures and algorithms, which im taking in school right now and were doing stacks.

@chubby2016

Basics of programming and fundamentals of CS do not always overlap fully. Learning languages is easy and a dime a dozen: the concepts, algorithms, code design, and knowing what types of languages grant what powers (Object Oriented versus Functional for example) is much more important for a CS career that won’t go away when the language switches. Taught right, fundamental CS should not focus on its language much if any.

That said, it seems like your high school is relatively advanced compared to most high schools, but I am sure you would get a good deal more from doing an intro CS class at a college level self-taught. Much more than learning a language at this point IMO. You have at least 4 years until you hit the workforce: that’s a lot of time for languages to change.

As far as the specific languages mentioned here, if you don’t go a course route, go Python.

C++ is basically Java with the quirks (which do have their advantages, but cause plenty of extra work in exchange for them) of C: While very established and historically popular, it has a lot of legitimate criticisms as better languages become available, though still probably one of the best languages for games and graphics. But it is not programmer friendly. At my school, we don’t even go into it unless you specifically need to: there’s an entire semester class just on the semantics of the language. You can learn that anytime and you won’t gain much from it unless you are specifically looking to go into graphics or game design.

Python, on the other hand, was designed to be programmer friendly: it practically reads like pseudocode. A lot of companies are shifting towards it for many uses. A lot of introductory courses are using it for its simplicity syntactically, but it still has plenty of power. It will also expose you to a bit more of a functional style.

That may have been true 10 years ago but the tides are shifting and I doubt it is true now, though I can’t say I have stats currently to back it up and I am on my way out the door, but I’ll look it up later to see if there’s some better statistics.

Here we are: http://cacm.acm.org/blogs/blog-cacm/176450-python-is-now-the-most-popular-introductory-teaching-language-at-top-us-universities/fulltext

C++ is falling very far down that list.

C++ is listed as #3 in Industry, but Python is not far behind at #6, and I suspect C++ will only fall more before settling as a language for particular use rather than wide general use as it has been often historically used.

To equate “most popular language for an introductory course” with “most important language evar” is laughable. In truth, use of programming languages in industry is proprietary information so no one can give you a real answer.

I’ve used both C++ and Python extensively, and the simple truth is this: each tool has its own separate uses, and this “which is better” game is idiotic and pointless.

That said, for the kinds of things that an introductory course is meant to teach, Java > Python > C++ > C. But you already have Java, so C or C++ for a more machine code-like language is probably better. But I’d suggest you learn theory, not languages, at this point. Or wait until college.

Probably the best advice, though possibly best done with classes. There are some things that are very difficult to learn by self-study, when you don’t know what is and isn’t important. Professors know what matters and what doesn’t better than you do.

Some schools’ introductory CS courses or sequences for CS majors use more than one computer language, since the one that best fits the material being taught may vary. That can also help show the students that CS is not just about a programming language, but that one should choose the best tool (programming language) for the task.