3. WhatisPython?
WhatisC++?
Basicsof
Python
Applications
What is C++?
❑ C++ is a general-purpose programming language that emphasizes the design and
use of type-rich lightweight abstractions.
❑ It is best suited for resource-constrained applications, such as those found in
software infrastructures.
❑ It was created as an extension of C, which means that any program written in C is
also a valid C++ program.
❑ The use of C++ has changed dramatically over the years – so has the language
itself. It is a language for someone who takes the task of programming seriously.
❑ Ordinary practical programmers have achieved significant improvements in
productivity, flexibility, and quality in projects of just about any kind and scale.
❑ The latest iteration of C++ standard has introduced many new features that help
control the complexity of programs.
7. NatureofPythonand
C++
python
c++
3
2
1
Nature of Python and C++
Python C++
1
2
3
Python is a dynamically typed
language which looks like it was
designed and not accumulated
It has a minimalist design that makes
code easy to understand and easy to
predict
Python is strongly typed language in
which type checking is done at run-
time and variables cannot be implicitly
coerced to unrelated types
C++ is a statically typed language in
which variable types are explicitly
declared and are determined at
compile time
Static typed languages like C++
associate types with variables,
not with values.
Highly portable, a top choice for
multi-device, multi-platform
development
8. NatureofPython
andC++
python
c++
Python’s standard
implementation is
currently coded in C, so all
the normal rules about
mixing C programs with
C++ programs apply to the
Python interpreter.
Python uses dynamic
memory allocation
process which involves
a private heap
containing all Python
objects and data
structures
Python is well suited
for modern software
methodologies such as
modular, structured,
and object-oriented
design, which allow
code to be written
once and reused many
times.
9. NatureofPython
andC++
python
c++
C++ does not need a
garbage collector
because it has no
garbage which in turn
makes it more prone
to memory leak.
Memory
management in C++
is both prone to
errors and time
consuming.
Memory Management and
Efficiency
In c++
C++ is a low level
language which
makes it less
versatile and more
difficult to learn
than Python
11. conclusion
Conclusion
conclusion
Conclusion
Python uses Garbage Collectionwhereas 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.
The conclusions of differences between C++ and Python:
12. conclusion
conclusion
conclusion
conclusions Python has less backwards compatibility.
Majority of all applications are built fromC++.
Majority of all 3D applications offerPython access to their API's.
Python code tends to be 5 to 10 times shorter than that
writtenin C++.
In Python, there is no need to declare types explicitly.
The conclusions of differences between C++ and Python:
13. conclusion
conclusion
conclusion
conclusion
Python requires an engine to run.
Python is interpretedeach time it runs.
Python is hard to install on a Windows box and thus makes
distributionof the programproblematic.
C++ is a pure binary that links to existing libraries to assistthe
coding.
In Python, variables are in scope evenoutside the loops in which
they are firstinstantiated.
The conclusions of differences between C++ and Python: