1.Python Introduction,Comments, Identation
1.Python Introduction,Comments, Identation
Open
Access
8
Netherlands then.
VERSIO
NS
How Python
works
1. Easy to Read, Learn and Use
2. Interpreted Language
3. Interactive Language
4. Portable
5. Free and Open Source
6. Embeddable
7. Huge Library
8. Cross-Compilation
9. Object Oriented
10. Extensible
11. Scalable
12. Database Interfaces
13. GUI programming
14. Automatic Memory Management-
APPL I CAT I ONs
OF PYTHON
WEB D ATA
A P P L I C AT I O N s SCIENCE
D E S KT O P IMAGE
A P P L I C AT I O N s PROCEssING
D ATA B A S E
GAME MANAGEME
DEV ELOP M EN T NT
W E B A P P L I C AT I O N
DEVELO PM ENT
D E S KT O P A P P L I C AT I O N
GAME
DEVELO PM ENT
D ATA B A S E
D ATA S C I E N C E
IMAGEPROCESSING
24
Python is used by :
Google, Bit-Torrent, YouTube,
Pinterest, Instagram, Intel, IBM,
NASA, Pixar, Netflix, Facebook, JP
Morgan Chase, Spotify etc.
25
Identifiers I
• The name should begin with an uppercase or a lowercase alphabet or an underscore sign (_).
• This may be followed by any combination of characters a–z, A–Z, 0–9 or underscore (_).
a=b=c=d=67
Python Keywords
30
Output
Enter your
name: vignan
Hello , vignan
M Bhargavi|AsstProf|CSE
Indentation
Definition
• a = 33
b = 200
if b > a:
print("b is greater than a")
Output: b is greater than a
• if(5>2):
print("5 is greater than 2")
Output: Indentation Error
Comments
Definition
• Comments can be used to explain Python code.
• Comments can be used to make the code more readable.
• Comments can be used to prevent execution when testing code.
Creating a Comment
• #This is a comment
print("Hello, World!")
Output: Hello, World!