24 Respostas
+ 18
The biggest difference between Python & C++ is that Python is interpreted & dynamically typed (types of variables can change) while C++ is compiled & statically typed (types of variables cannot change). This leads to many differences like:
1. Python can be much much slower and heavier in terms of memory. For example, an instance of an empty class in Python occupies 48 bytes of space while in C++ it occupies only 1 byte
2. Python is harder to debug because of being interpreted. A very basic example is that if you wanted to return int("100") from a function but returned "100", there would be no error but it will cause problems later. C++ being compiled, can perform a lot of checks and optimizations before even running the program.
3. Python is easier to learn and write
4. Python has tons of libraries and a built-in package manager
Python is used more in fields like data science where performance is not the highest priority and C++ is used in the exact opposite fields like game development.
+ 5
Ebuka Anafulu
The biggest difference between Python & C++ is that Python is interpreted & dynamically typed (types of variables can change) while C++ is compiled & statically typed (types of variables cannot change). ... Python can be much much slower and heavier in terms of memory
+ 4
I think both has théir own importance
+ 3
The amount of work given to the programmer. C++ needs more planification (for more specifics results if you want), and python doesn't. This make python easy to learn on some cases.
+ 3
Python is the preferred and chosen language in Data Science.
+ 3
the big difference is that c++ is more widely used in all categories. I chose the c++ path myself.
+ 2
Jan Markus yeah so?
+ 2
Jan Markus I get that but what's your point?
+ 2
In c we have limited library and in python we have a lot of library
+ 2
hi too all.
C++ is best programming for pc game like Minecraft clash of clans pubg and etc but Python is very important in IOS or Android
+ 1
I see...but what can Python do that C++ can't...or the reverse?
+ 1
Grzegorz Słowiński True.. thats why my python friends semicolons are useful.. you wont get an error because of a tab :)
+ 1
C++ is efficient and very fast while Python is easier but very slow. Better use both of them
+ 1
The main reason I prefer C (and C++) over python is because it's way faster than python, and does the job without using much memory. It's also very much structured, a fair enough excuse for liking it. Finally, you don't want your device to keep on interpreting a long code, if it's never changed (as in the case of many single-purpose devices); the machine code generated by C (and C++) is faster to execute.
+ 1
Ebuka Anafulu c++ and python can do anything in a simple way. But python does things more eficient on some cases, but if you want to go out of the python usual circusntances, is better use c or c++.
Sorry for bad english.
+ 1
Differences - compiler issues, memory hogging, user-friendly coding & latency.
Which is advantageous ?
Do you want to start a war in the comment section ?
Fields :
C++ for gaming & graphic intensive tasks.
Python for Analytics & Automation.
+ 1
Hi Ebuka Anafulu. the basic things is c++ is more recommend for creat games and app for computer or mobile for android. but Python is used for IOS development to use to make app. I learned C++ for make game or app.
+ 1
Python: print("text")
C++: count << "text"