Why should I learn Python over C or C++?

Asked by Last Modified  

Follow 14
Answer

Please enter your answer

Teachar

There are definite differences. C++ is a strongly typed language and Python is not. There's no need to declare variables. ... (I generally don't like languages to be dependent on any kind of formatting, but Python used indentation as a scope mechanism.)
Comments

Tutor

Future is of python not c.. Cplus
Comments

its easy yet powerful
Comments

Tutor

Absolutely. Learn any programming language, to its depths, you'll be good.
Comments

because python is the new trend and easier to learn. all IT industries are using python
Comments

Some differences between C++ and Python: Python uses Garbage Collection whereas C++ does not. C++ is a statically typed language, while Python is a dynamically typed language. Python is easier to use than C++. Python is run through an interpreter, whilst C++ is pre-compiled. Hence, C++ is faster...
read more
Some differences between C++ and Python: Python uses Garbage Collection whereas C++ does not. C++ is a statically typed language, while Python is a dynamically typed language. Python is easier to use than C++. Python is run through an interpreter, whilst C++ is pre-compiled. Hence, C++ is faster than Python. C++ supports pointers and incredible memory management. Python supports very fast development and rapid, continuous language development. Python has less backwards compatibility. Majority of all applications are built from C++. Majority of all 3D applications offer Python access to their API's. Python code tends to be 5 to 10 times shorter than that written in C++. In Python, there is no need to declare types explicitly. Smaller code size in Python leads to leads to "rapid prototyping", which offers speed of development. Python requires an engine to run. Python is interpreted each time it runs. Python is hard to install on a Windows box and thus makes distribution of the program problematic. C++ is a pure binary that links to existing libraries to assist the coding. In Python, variables are in scope even outside the loops in which they are first instantiated. In Python, a function may accept an argument of any type, and return a value of any type, without any kind of declaration beforehand. Python provides flexibility in calling functions and returning values. Python looks cleaner, is object oriented, and still maintains a little strictness about types read less
Comments

Tutor

if u know about the c or C++ oops concept its easy to learn and However, the biggest difference between these languages is their runtime and how they are compiled. C and C++ are compiled to native executables. Python is interpreted at runtime and hence isn't compiled until runtime (although Python does...
read more
if u know about the c or C++ oops concept its easy to learn and However, the biggest difference between these languages is their runtime and how they are compiled. C and C++ are compiled to native executables. Python is interpreted at runtime and hence isn't compiled until runtime (although Python does cache compiled copies in *.pyc files read less
Comments

Corporate Trainer

Advantages of any modern interpreted language over C++. Like any tradeoff, these are advantages in some situations and disadvantages in others. Situations where you don't want these conveniences are becoming more rare, though, as hardware gets even faster and high-level language implementations get...
read more
Advantages of any modern interpreted language over C++. Like any tradeoff, these are advantages in some situations and disadvantages in others. Situations where you don't want these conveniences are becoming more rare, though, as hardware gets even faster and high-level language implementations get even more efficent. No compile step. Write your code in my_program.py, then run it with python my_program.py. No memory management. You don't have to explicitly allocate memory for new variables, and you don't have to explicitly free memory you're done with. The interpreter will allocate memory for you and free it when it's safe to do so. High-level native data types. Strings, tuples, lists, sets, dictionaries, file objects and more are built-in. As an example, {"x": "y"} defines a dictionary (hash table) with string "x" as a key and string "y" as its value. Specific advantages of Python: Especially clean, straightforward syntax. This is a major goal of the Python language. Programmers familiar with C and C++ will find the syntax familiar yet much simpler without all the braces and semicolons. Duck typing. If an object supports .quack, go ahead and call .quack on it without worrying about that object's specific type. Iterators, generators and comprehensions. To get the first character of every line in a file, you'd write: file = open("file.txt") list_of_first_characters = [line[0] for line in file] file.close() This iterates over the file only once. (These particular features are just the tip of the iceberg of simple built-in syntax for high-level language features. Check out decorators next if you're intrigued.) Huge standard library. Just to pick some random examples, Python ships with several XML parsers, csv & zip file readers & writers, libraries for using pretty much every internet protocol and data type, etc. Great support for building web apps. Along with Ruby and JavaScript, Python is very popular in the web development community. There are several mature frameworks and a supportive community to get you started. read less
Comments

Python is multipurpose high level language which is most demanding nowadays and it is significantly used as machine learning, data science fields. However, C/C++ are also important languages considering as most secured languages. So, you should go forwards both of these languages.
Comments

Engineer

You should learn python over C or C++ because the job you are excited about wants you to use python. If you don’t know what that job is, then learning how to be the best programmer possible is probably the next best idea. In that case it really depends on what kind of person are you. Python is better...
read more
You should learn python over C or C++ because the job you are excited about wants you to use python. If you don’t know what that job is, then learning how to be the best programmer possible is probably the next best idea. In that case it really depends on what kind of person are you. Python is better for people who who learn by having immediate gratification and can wait to learn what is behind the magic. C or C++ is better for people who get frustrated by not knowing how things work. Eventually one should learn all three languages and many more. The order is not super important. Managed memory, easy-to-use standard library (just compare c string to python str) and binding for almost everything: all these lead to rapid development. Python also comes with class, making it easier to model things and organize code. read less
Comments

View 8 more Answers

Related Questions

How do I write a C program to print the total number of a single-digit prime number using a loop?
Single Digit prime number means number from 0 to 10 which are prime. so write for loop which will iterate from 0 to 10 as the value of i your i is nothing but the number pass the value of i to function...
Momin
0 0
7
What is meant by high-order and low-order bytes?
Lower order and higher-order bytes are the terms used while computing calculations in a programming language. Usually, numbers are written from left to right. The left is the most significant bit, and...
Vishal
0 0
9
What is the meaning of \n and \t in C language?
is new line and \t is for tab
Priya
0 0
5

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Why Indexing Should Start From Zero In Array ?
Why numbering should start at zero? To denote the subsequence of natural numbers 2, 3, ..., 12 without the pernicious three dots, fourconventions are open to usa) 2 ≤ i < 13b) 1 < i ≤ 12c)...

Is It Fine To Write “void main()” Or “main()” In C/C++?
The definition: void main() { /* ... */ } Is not and never has been C++, nor has it even been C. See the ISO C++ standard 3.6.1 or the ISO C standard 5.1.2.2.1. A conforming...

All About Programming And A Good Programmer.
Hi, This is my first lesson for you guys. Hope you enjoy reading it. In recent community questions, I found many people wanted to be good programmers, or wanted to have good hands on certain language,...

Recursion in C Programming
The process of calling a function by itself is called recursion and the function which calls itself is called recursive function. Syntax of Recursive Function returntype recursive_func () { statements; ...
R

Ravindra Yadav

2 0
0

C Program to print Block Letter and Small Case Alphabets using C
/* WAP to print Block Letter and Small Case Alpahbets using C*/ //Hint:use ascii code(value) to print #include#include void main(){ int i; clrscr(); //Block Letters Alphabets printf("Block Letters Alphabets\n");...

Recommended Articles

Lasya Infotech is a Hyderabad based IT training institute founded in 2016 by O Venkat. Believing in his innovation, passion and persistence and with a diverse blend of experience, he started his brainchild to deliver exemplary professional courses to aspiring candidates by honing their skills. Ever since the institute envisions...

Read full article >

Brilliant Academy is one of the reputed institutes for B.Tech tuition classes. This institute is specialised in delivering quality tuition classes for B.E, Engineering - all streams and Engineering diploma courses. Incorporated in 2012, Brillant Academy is a brainchild of Mr Jagadeesh. The main motto of the academy is to...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...

Read full article >

Looking for C Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you