Professional Documents
Culture Documents
What is Python?
Why learn python in 2022?
Syllabus:
Introduction
History,Features,Setting up path,Working with Python,Basic Syntax,Variable and Data
Types, Operator
Conditional Statements
If ,If- else,Nested if-else,Looping,For,While,Nested loops
Control Statements
Break, Continue, Pass
String Manipulation
Accessing Strings, Basic Operations, String slices, Function and Methods
Lists
Introduction, Accessing list, Operations, Working with lists, Function and Methods
Tuple
Introduction,Accessing tuples,Operations,Working,Functions and Methods
Syllabus: Continue...
Dictionaries
Introduction, Accessing values in dictionaries, Working with dictionaries,Properties
Functions
Defining a function,Calling a function,Types of functions,Function Arguments,
Anonymous functions,Global and local variables
Modules
Importing module, Math module, Random module, Packages,Composition,
Input-Output
Printing on screen, Reading data from keyboard, Opening and closing file, Reading and
writing files, Functions
Exception Handling
Exception, Exception Handling,Except clause, Try ? finally clause, User Defined
Exceptions
What is Python?
• High-level Language:
High-level language (closer to human) refers to the higher
level of concept from machine language (for example
assembly languages). Python is an example of a high-level
language like C, C++, Perl, and Java with low-level
optimization.
• Portable:
High level languages are portable, which means they are able
to run across all major hardware and software platforms with
few or no change in source code. Python is portable and can be
used on Linux, Windows, Macintosh, Solaris, FreeBSD, OS/2,
Amiga, AROS, AS/400 and many more.
Features of Python continue......
• Python is Interactive :
Python has an interactive console where you get a Python
prompt (command line) and interact with the interpreter
directly to write and test your programs. This is useful for
mathematical programming.
• Interpreted : Python programs are interpreted, takes
source code as input, and then compiles (to portable
byte-code) each statement and executes it immediately. No
need to compiling or linking
Features of Python continue......
● YouTube
● Amazon
● Google
● Facebook
● IBM
● NASA
● Netflix
Why does Python language preferable than other data science tools?
★ Robust and simple to use
★ Scalable
★ Options of Libraries
★ Extensive Visualization and Graphics options
5. Python is used in scripting & automation
Some of the popular Python libraries and frameworks are listed below:
❖ A Semantic error is when your logic is wrong.For example, if you enter Python 102
instead of Python 101, you don't get an error message,but your code is wrong.
Comment
❖ Comment tells other people what your code does.
❖ Single line comment
You simply put a hash symbol proceeding your comment. When you run the code, Python
will ignore the comment.
❖ Multiline comment
A triple quoted multi-line string is also treated as
comment if it is not a docstring of a function or class.
Syntactic error
❖ A Syntactic error is when Python does not understand your code. For example, if you
spell print "frint", you will get an error message.
Type in Python (int,float,str,bool,...
Type-casting in Python
You can change the type of the expression in Python; this is called type-casting.