C vs python
Programming languages
what is programming language
Programming language is a
way for programmers
(developers) to communicate
with computers.
history of programming language
The first programming language was
developed in 1883 when Ada Lovelace
and Charles Babbage worked together
on the Analytical Engine, which was a
primitive mechanical computer.
ALGOL
ALGOL is an acronym that stands
for ALGOrithmic Language. It is a
computer language designed
specifically for calculation.
COMPARISON
C LANGUAGE PYTHON LANGUAGE
C is a structured, mid- Python is a general-purpose,
high-level programming
level, general-purpose language that was
programming developed by Guido Rossum
language that was in 1989. What makes Python
developed at Bell amazing is its simple syntax
that is almost similar to the
Laboratories between English language and
1972-73 by Dennis dynamic typing capability.
Ritchie.
VARIABLE DECLARATION
C PYTHON
In C, the type of a variable must There is no need to declare the
be declared when it is created, type of variable. Variables are
and only values of that type untyped in Python. A given
must be assigned to it. variable can be stuck on values
of different types.
EXAMPLE:
EXAMPLE:
Int 12;
no = 1
float 4.9;
flt= 5.9
char “SARAN”;
letter = 'A'
execution
C PYTHON
C is a compiled Python is an
language, meaning interpreted
the code is language, meaning
translated directly the code is executed
into machine code line-by-line by an
by a compiler before interpreter.
execution.
SYNTAX
PYTHON
C
Syntax of C is harder than python It is easy to learn, write and
because of which programmers read Python programs than
prefer to use python instead of C.
C.
EXAMPLE:
EXAMPLE:
#include <stdio.h>
int main() {
print("Hello, World!")
printf("Hello, World!\n");
return 0;
}