In which field of Programming is Python preferred over C++ . And vice versa | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 22

In which field of Programming is Python preferred over C++ . And vice versa

C++ seems to be more popular. Want to. figure out it's benefits and limitations over Python

16th May 2017, 8:47 PM
Ghaffaru Mudashiru
Ghaffaru Mudashiru - avatar
3 Answers
+ 18
Python is scripting language, which means that users may write relatively short programs to automate certain tasks in a defined environment. This makes it suitable and more specifically used in Data Sciences and Machine learning. C, C++ on the other hand is useful for making OS and other huge systems. Both languages are general-purposed though, which means almost anything that you do in C or C++ can be done in Java, Python or any other programming language.
17th May 2017, 2:29 AM
Hatsy Rei
Hatsy Rei - avatar
+ 7
Python is easy and quick to write. It's very expressive. In game dev, it's ideal for enemy AI, environment controls, etc. Actually most of the game. C++ is a lower level than Python language. It's not a "lower level language" technically though. Anyhoo, C++ is compiled into very optimized machine code and almost all APIs support it. But it's slow to write and large to maintain. Basically it's more for things like the game engine itself, the performance critical stuff and interfacing with APIs like DX or OpenGL. In short, use C/C++ for creating the beast and Python for telling it what to do. Most games are written in C++ with little or no scripting in Python or anything else and some games are made using only Python and PyGame so there are exceptions of course, I'm just giving you the general lowdown.
21st May 2017, 10:38 PM
Jamie
Jamie - avatar
+ 5
I'm learning C++ Because it's something I need to make programs and I am going to learn Python After I finish C++ Python is also Great
22nd May 2017, 2:49 AM
keivan Ipchi
keivan Ipchi - avatar