Day 1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

Python 360

DAY 1
Master Class Tamil series
Introduction of
Python
• Python is powerful and fast;

• plays well with others;

• runs everywhere;

• is friendly & easy to learn;

• is Open.
Introduction

Python is :
1. High-level programming language.
2. Fast to learn and fast to develop application.
3. Available for many platforms.
4. Implement complex logic with very few lines of code.
What is python
• Python is an interpreted
• Interactive
• High level
• Object oriented programming language
Two kind of program processes:

• Interpreters

• Compilers
INTERPRETER
Input It takes a single line of code or
instruction at a time.
Output It does not produce any intermediate
object code.
Working mechanism Compilation and execution take place
simultaneously.
Speed Slower

Memory It requires less memory as it does not


create intermediate object code.
Errors Displays error of each line one by one.

Error detection Easier comparatively


COMPILERS
Input It takes an entire program at a time.

Output It generates intermediate object code.

Working mechanism The compilation is done before


execution.
Speed Comparatively faster

Memory Memory requirement is more due to the


creation of object code.
Errors Display all errors after compilation, all at
the same time.
Error detection Difficult
Interpreters
Compilers
Why we learn python:
• Easy to learn
• Easy to maintain
• Bulk library
• Interactive mode
• Portable
• Database-commercial support
APPLICATION
• How to Install Python Software
• Basic Syntax
• How to Run Python Code
Installation:
• Google -> search /python
Welcome to Python.org
• download -> version selection ->download
https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe
• show in folder and important things to select add python path
BASIC SYNTAX
Basic Syntax:
• Indentation
• Variable
• Multiline statement
Indentation:
.No (),{} indicate the block
Example:
if True:
print(‘T’)
else False:
print(‘F’)
Variable:
 No need to declare
 Python automatically can take data types
Example:
a=10 (int)
b=‘Pantech’ (string)
c=10.1 (Float)
Multiline statement:
• Line continuation character(\)
Example:
a=10
b=10
c=10
d=a+\
b+\
c
print(d)
HOW TO RUN PYTHON CODE
Types:
• Interactive Mode Programming
• Script Mode Programming
• Idle
Interactive Mode programming
• Its related to interactive
• Like conversation
• Can’t save for future usage
• Example:
using in command prompt
A=10
B=5
C=A+B
Script Mode Programming
• It can save for further usage
• File name save must be in .py format
• Code scripted in Note pad
Idle
• Integrated Development Environment
• Useful for beginners
• Idle shell like command prompted cant save .py file
• Idle, editor file can be save in installed location
• Out put will be display in idle shell
• F5 key helps for Run
Code editor
• Pycharm

You might also like