Programming with Python: Basics & Features

Telechargé par Navani
Programming with Python
* Object oriented
* Created by Guido Rossum
* comes from C, C++, Smalltalk etc..
Python is :
Interactive
Interpreted
Object Oriented
Interpreted-Translates code line by line
Interactive- Uses IDLE (Integrated Development Learning Environment)
Object Oriented- can select any style of programming
Features of Python-
Easy to Learn
Readable
Python libraries are compatible with all operating systems
Python is portable as it can run on a large variety of hardware platforms
Database Support - Python provides an interface to all databases
Programs
To print the version of Python -
import sys
print.(sys.version)
Escape Sequences
A special way to include characters in a string
\ - double quotes
EX - \”HELLO\
\n - new line
EX - Hello\n
\t - tab or space
EX - HELLO\t
\\ - single backslash
EX- HELLO\\
ARITHEMATIC OPERATORS
These are used to perform used to perform basic mathematical operations in python
They help programs process numerical data and carry out calculations
RULES FOR WRITING VARIABLE NAMES
variable can have alphabets numbers and underscores
No special characters allowed
It must always start with a letter or underscore
It cannot start with a number
It is case sensitive
1 / 2 100%
La catégorie de ce document est-elle correcte?
Merci pour votre participation!

Faire une suggestion

Avez-vous trouvé des erreurs dans l'interface ou les textes ? Ou savez-vous comment améliorer l'interface utilisateur de StudyLib ? N'hésitez pas à envoyer vos suggestions. C'est très important pour nous!