0

C++ VS Python

hi, after learning around 40% of C++, i tested python to compare them, python seemed like a calculator for me (which i can write with C++). what is the difference between the C++ and Python?

10th Oct 2018, 9:24 PM
Jikimo Toushirou
Jikimo Toushirou - avatar
5 Answers
+ 5
Python isn't any more math-like than C++. The lessons have likely just introduced the Python language with math operations. The difference is many for the two, I'll try and give you an idea. C++ is statically typed, Python is dynamic. Meaning you don't need to declare variable types in Python. Python is interpreted, meaning it doesn't compile, it just runs, while C++ needs to compile. C++ is much faster and powerful than Python, able to handle more complex programs. For example C++ made GTA5, Python would not be able to make that game. Pythons strength over C++ in my opinion is how fast you can develop a program, making it ideal for quick automation. You could make Python generate videos and upload it to your YouTube channel in a day or two (I did this), C++ would likely take much longer to develop for the same thing, but it would also be able to be better at it. C++ would take too long to develop a program to organize photos and rename them by date created, Python could be made in 1 minute.
10th Oct 2018, 11:16 PM
Ahri Fox
Ahri Fox - avatar
+ 3
Keep learning about both you will soon se the difference.
10th Oct 2018, 9:32 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 3
You probably looked at the "Simple operations" section that shows that you can use a python interpreter to add numbers etc. That's just to demonstrate how to use a python interpreter. It's not what python is about, python is not a calculator. You should at least finish the "Basics" chapter before you have any basis to compare two languages.
11th Oct 2018, 5:54 AM
Anna
Anna - avatar
+ 1
but man... im bad at math
10th Oct 2018, 10:06 PM
Jikimo Toushirou
Jikimo Toushirou - avatar
+ 1
Python is scientific (data science, ML, AI, (backend), etc) C++ is for developing complex things, both are different, learn both and you'll get the difference. It is said that, you can make the best of the best with this two.
24th Sep 2020, 5:55 AM
Md. Faheem Hossain
Md. Faheem Hossain - avatar