Which one is good C++ or python?
Answers
Answered by
0
u should learn both.....if u hv doubts.....go to technical sagar youtube channel.....there are videos about this
Answered by
0
Heya Arsilkhan861,
Here's the answer you were looking for :)
It takes five years to master C++ and three months to master Python. (That is, at the level of profciency you need to write quality software.) You can write good software in Python and bad software in Python, and similarly you can write good and bad software in C++.
Both Python and C++ make it easy to write bad software, but in slighty different ways.
Python code will often need a bit of "help" from Cython, C, Fortran or even C++. So even if you know Python is still helps to know C and C++. However, if you use Cython you can get away with knowing a lot less about C++ than you would otherwise need.
Python has better libraries. Any library written for C++ can also be used from Python (using e.g. Cython).
Learning Python before C++ is a good idea because the basic data types in Python will teach you to use STL and Boost effectively in C++, and make you write better and more robust C++. If you learn C++ as an extension to C you will not be equipped with this knowledge.
C++ cannot compete with Python for scientific computing or web development.
C++ is probably better for mobile and tablet apps because of smaller dependencies (e.g. no need to embed a Python interpreter).
Swift is an interesting middle ground, particularly because of the long time it takes to master C++.
Oh yes, and the speed issue, because this aways comes up:
If you decrease the computational speed by a factor of a million, you can see the runtime increase from 1 ns to 1 ms. Both are below the level of human perception. On the other hand, you might also see the runtime increase from one minute to nearly two years. That would probably matter. The "need for speed" is very dependent on the problem! Is is not uncommon that C++ code will run 20-200 times faster than similar Python code (without any external libraries or optimisations). But does it matter? Look at the absolute run-time for a real-world problem, not the relative speed. If its fast enough, it is fast enough.
When can you tell the difference between Python and C++? Hardly ever, because it always depends on the programmer. You can write fast software in Python and slow software in C++, or vice versa. Some of the world's biggest high-performance computing projects use Python. NASA use Python for the Hubble telescope. Do you think you need more computing speed than NASA? If you use high-quality libraries, you will usually see that your Python code will run faster than anything you can code on your own in C++. But every now and then, Python code will need help from a small amount of compiled code to run fast enough, e.g. Cython, Numba, Fortran, C or C++.
There is a new LLVM-based JIT compiler for Python called Numba which often make Python code run at speed comparable to -O2 in C. Cython also allows us to write "Python" code that runs at the speed of C, and Cython code is callable from Python.
In scientific computing (and many other cases like e.g. economic analyses), the total runtime is not just the CPU time but the total time it takes from you start coding until you arrive at the answer. This includes the time you spend coding. Here, C++ cannot compete with Python.
From brainly and team.
Hope this answer helps you!!!!!!!!!
THANK YOU!!!!!!!
[plz mark my answer brainliest if it was helpful}
Here's the answer you were looking for :)
It takes five years to master C++ and three months to master Python. (That is, at the level of profciency you need to write quality software.) You can write good software in Python and bad software in Python, and similarly you can write good and bad software in C++.
Both Python and C++ make it easy to write bad software, but in slighty different ways.
Python code will often need a bit of "help" from Cython, C, Fortran or even C++. So even if you know Python is still helps to know C and C++. However, if you use Cython you can get away with knowing a lot less about C++ than you would otherwise need.
Python has better libraries. Any library written for C++ can also be used from Python (using e.g. Cython).
Learning Python before C++ is a good idea because the basic data types in Python will teach you to use STL and Boost effectively in C++, and make you write better and more robust C++. If you learn C++ as an extension to C you will not be equipped with this knowledge.
C++ cannot compete with Python for scientific computing or web development.
C++ is probably better for mobile and tablet apps because of smaller dependencies (e.g. no need to embed a Python interpreter).
Swift is an interesting middle ground, particularly because of the long time it takes to master C++.
Oh yes, and the speed issue, because this aways comes up:
If you decrease the computational speed by a factor of a million, you can see the runtime increase from 1 ns to 1 ms. Both are below the level of human perception. On the other hand, you might also see the runtime increase from one minute to nearly two years. That would probably matter. The "need for speed" is very dependent on the problem! Is is not uncommon that C++ code will run 20-200 times faster than similar Python code (without any external libraries or optimisations). But does it matter? Look at the absolute run-time for a real-world problem, not the relative speed. If its fast enough, it is fast enough.
When can you tell the difference between Python and C++? Hardly ever, because it always depends on the programmer. You can write fast software in Python and slow software in C++, or vice versa. Some of the world's biggest high-performance computing projects use Python. NASA use Python for the Hubble telescope. Do you think you need more computing speed than NASA? If you use high-quality libraries, you will usually see that your Python code will run faster than anything you can code on your own in C++. But every now and then, Python code will need help from a small amount of compiled code to run fast enough, e.g. Cython, Numba, Fortran, C or C++.
There is a new LLVM-based JIT compiler for Python called Numba which often make Python code run at speed comparable to -O2 in C. Cython also allows us to write "Python" code that runs at the speed of C, and Cython code is callable from Python.
In scientific computing (and many other cases like e.g. economic analyses), the total runtime is not just the CPU time but the total time it takes from you start coding until you arrive at the answer. This includes the time you spend coding. Here, C++ cannot compete with Python.
From brainly and team.
Hope this answer helps you!!!!!!!!!
THANK YOU!!!!!!!
[plz mark my answer brainliest if it was helpful}
Similar questions