0% found this document useful (0 votes)
2 views31 pages

11th Ch2 Python Class 1

The document provides an overview of Python, including its history, advantages, and installation methods. Python, created by Guido van Rossum in the early 90s, is a versatile programming language that supports multiple programming paradigms. It also covers basic usage, including the print function and development environments like IDLE.

Uploaded by

qdnvg4xv8m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views31 pages

11th Ch2 Python Class 1

The document provides an overview of Python, including its history, advantages, and installation methods. Python, created by Guido van Rossum in the early 90s, is a versatile programming language that supports multiple programming paradigms. It also covers basic usage, including the print function and development environments like IDLE.

Uploaded by

qdnvg4xv8m
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

POINTS TO PONDER

INTRODUCTIO SCRIPT VS SCOPE OF


HISTORY
N PROGRAM PYTHON

ADVANTAGE
VS PRINT()
INSTALLATION
DISADVANTAG FUNCTION
E OF PYTHON
Brief History of Python
INVENTED IN THE NETHERLANDS, EARLY 90S BY GUIDO VAN
ROSSUM
NAMED AFTER MONTY PYTHON

OPEN SOURCED FROM THE BEGINNING

CONSIDERED A SCRIPTING LANGUAGE, BUT IS MUCH MORE

SCALABLE, OBJECT ORIENTED AND FUNCTIONAL FROM THE


BEGINNING
USED BY GOOGLE FROM THE BEGINNING

INCREASINGLY POPULAR
POINTS TO PONDER
ADVANTAGE
FEATURES OF VS
DAILY USERS
PYTHON DISADVANTAG
E OF PYTHON

INSTALLATIO
PRINT()
N OF PYTHON
FUNCTION
IDLE
• Dynamically
typed means
that you as a
programmer
can write a little
quicker because
you do not have
to specify types
every time
PYTHON HAS
TWO MODES
OF
PROGRAMMI
NG
FIRST PYTHON PROGRAM
Running
Python
Installing

Python is pre-installed on most Unix systems, including Linux and MAC OS


X
The pre-installed version may not be the most recent one (2.6.2 and 3.1.1
as of Sept 09)
Download from http://python.org/download/
Python comes with a large library of standard modules
There are several options
IDLE – works well with Windows
Emacs with python-mode or your favorite text editor
Eclipse with Pydev (http://pydev.sourceforge.net/)

PRESENTLY WE ARE USING 3.12


STEPS
CHECK THE VERSION IN CMD
IDLE
Development
Environment
• IDLE is an
Integrated
DeveLopment
Environment for
Python, typically used
on Windows
• Multi-window text
editor with syntax
highlighting, auto-
completion, smart
indent and other.
• Python shell with
syntax highlighting.
OUR PYTHON PROMPT
• PRODUCE THE TEXT OUTPUT
ON THE CONSOLE
• SYNTAX
print(value,sep=‘’,end=‘\n’,file=sys.stdout

print() Value-value to be printed

function Sep-string inserted between


values,default,a space
End-string appended after last
value,default ,a new line
File-optional,by default file attribute is
used to print objects on the screen
LET’S CHECK THE OUTPUT
FOR THE FOLLOWING
print(‘Welcome to programming’)
print(10,20,30,sep=‘@’)
print(‘Python’,’Programming’)

OUTPUT
Welcome to programming
10@20@30
Python Programming
print(‘welcome to
LET’S programming’,end=#)

CHECK
THE print(‘Python’,’Programming’)

OUTPUT
FOR THE OUTPUT

FOLLOWIN Welcome to
G programming#Python
Programming
WRITE INSTRUCTION TO
THE INTERACTIVE MODE
FOR THE FOLLOWING
a)TO DISPLAY SUM OF 3,8,6x12

B)TO DISPLAY SUM OF 16,5.0,44.0


WRITE THE OUTPUT OF
THE FOLLOWING
a)num1=4
num2=num1+1
num1=2
print(num1,num2)

b)Record what happens when the following statements are executed

print(8+5)
print(3.14*7)
print(“I am a class XI”+”student”)
Exiting python

CTRL+Q
TYPE quit() or exit() and press
Enter key
ALT+F4

You might also like