SlideShare a Scribd company logo
WELCOME TO VIBRANT
TECHNOLOGIES & COMPUTERS
Python Training Topics
Python Training Topics
What is Python?
 A programming language with strong similarities to
PERL, but with powerful typing and object oriented
features.
 Commonly used for producing HTML content on websites.
Great for text files.
 Useful built-in types (lists, dictionaries).
 Clean syntax, powerful extensions.
Why Python?
 Natural Language ToolKit
 Ease of use; interpreter
 AI Processing: Symbolic
 Python’s built-in datatypes for strings, lists, and more.
 Java or C++ require the use of special classes for this.
 AI Processing: Statistical
 Python has strong numeric processing capabilities:
matrix operations, etc.
 Suitable for probability and machine learning code.
Learning Python
 Unfortunately, we won’t have time to cover all
of Python in class; so, we’re just going to go
over ome highlights.
 You’ll need to learn more on your own.
 Homework 0 asks you to install Python or get
comfortable using it here in the lab. It also asks you to
read some online Python tutorials.
 Later homeworks will include Python programming
exercises to help you practice.
Installing Python
 Python is installed on the PCs in 156.
 Python for Win/Mac/Unix/Linux is available from
www.python.org.
 Generally an easy install.
 On macs, already part of OS X.
 For NLTK you need Python 2.3 or higher.
 GUI development environment: IDLE.
Credits:
http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.htm
IDLE Development Environment
 Shell for interactive evaluation.
 Text editor with color-coding and smart indenting for
creating python files.
 Menu commands for changing system settings and
running files.
 We will use IDLE in class.
Basic Datatypes
 Integers (default for numbers)
z = 5 / 2 # Answer is 2, integer division.
 Floats
x = 3.456
 Strings
Can use “” or ‘’ to specify. “abc” ‘abc’ (Same thing.)
Unmatched ones can occur within the string. “matt’s”
Use triple double-quotes for multi-line strings or strings than
contain both ‘ and “ inside of them: “““a‘b“c”””
Whitespace
 Whitespace is meaningful in Python: especially indentation and
placement of newlines.
 Use a newline to end a line of code.
(Not a semicolon like in C++ or Java.)
(Use  when must go to next line prematurely.)
 No braces { } to mark blocks of code in Python…
Use consistent indentation instead. The first line with a new
indentation is considered outside of the block.
 Often a colon appears at the start of a new block. (We’ll see this
later for function and class definitions.)
Comments
 Start comments with # – the rest of line is ignored.
 Can include a “documentation string” as the first line of any new function
or class that you define.
 The development environment, debugger, and other tools use it: it’s good
style to include one.
def my_function(x, y):
“““This is the docstring. This
function does blah blah blah.”””
# The code would go here...
Printing with Python
 You can print a string to the screen using “print.”
 Using the % string operator in combination with the print command, we can
format our output text.
>>> print “%s xyz %d” % (“abc”, 34)
abc xyz 34
“Print” automatically adds a newline to the end of the string. If you include
a list of strings, it will concatenate them with a space between them.
>>> print “abc” >>> print “abc”, “def”
abc abc def
THANK YOU

More Related Content

PPT
Introduction to phython programming
PPTX
Ctypes
PPTX
Python programming introduction
PPTX
Introduction to Python Programming
PPTX
python classes in thane
PPTX
Introduction Jupyter Notebook
DOCX
Python Programming Language
PPT
Introduction to python
Introduction to phython programming
Ctypes
Python programming introduction
Introduction to Python Programming
python classes in thane
Introduction Jupyter Notebook
Python Programming Language
Introduction to python

What's hot (15)

DOCX
PYTHON NOTES
 
PPTX
Python presentation
PPTX
Python your new best friend
PPTX
What is Python? An overview of Python for science.
PDF
Python indroduction
 
PPT
Python - Introduction
PPTX
Python basics
PDF
Basic Concepts in Python
PPTX
Logic programming in python
PPTX
Presentation on python
PPTX
Benefits & features of python |Advantages & disadvantages of python
PDF
علم البيانات - Data Sience
PDF
Get started python programming part 1
PDF
Python Workshop
PPTX
Python Introduction | JNTUA | R19 | UNIT 1
PYTHON NOTES
 
Python presentation
Python your new best friend
What is Python? An overview of Python for science.
Python indroduction
 
Python - Introduction
Python basics
Basic Concepts in Python
Logic programming in python
Presentation on python
Benefits & features of python |Advantages & disadvantages of python
علم البيانات - Data Sience
Get started python programming part 1
Python Workshop
Python Introduction | JNTUA | R19 | UNIT 1
Ad

Similar to Python Training Topics (20)

PDF
Python for katana
PDF
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
PPT
1.3 Basic coding skills_tupels_sets_controlloops.ppt
PDF
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
PDF
Python (3).pdf
PDF
How To Tame Python
PPT
Py-Slides-1.pptPy-Slides-1.pptPy-Slides-1.pptPy-Slides-1.ppt
PPT
1.3 Basic coding skills_fundamentals .ppt
PPT
Basic coding skills_python and its applications
PPTX
Introduction to python.pptx
PDF
Python Programing Bio computing,basic concepts lab,,
PPT
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
PDF
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
PPT
Python slides for the beginners to learn
PPT
Py-Slides-1.ppt1234444444444444444444444444444444444444444
PPT
program on python what is python where it was started by whom started
PPT
Python Over View (Python for mobile app Devt)1.ppt
PPTX
Pyhton problem solving introduction and examples
PDF
Pyhton-1a-Basics.pdf
PPT
presentation_intro_to_python
Python for katana
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
1.3 Basic coding skills_tupels_sets_controlloops.ppt
CSC2308 - PRINCIPLE OF PROGRAMMING II.pdf
Python (3).pdf
How To Tame Python
Py-Slides-1.pptPy-Slides-1.pptPy-Slides-1.pptPy-Slides-1.ppt
1.3 Basic coding skills_fundamentals .ppt
Basic coding skills_python and its applications
Introduction to python.pptx
Python Programing Bio computing,basic concepts lab,,
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
Python slides for the beginners to learn
Py-Slides-1.ppt1234444444444444444444444444444444444444444
program on python what is python where it was started by whom started
Python Over View (Python for mobile app Devt)1.ppt
Pyhton problem solving introduction and examples
Pyhton-1a-Basics.pdf
presentation_intro_to_python
Ad

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Approach and Philosophy of On baking technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Spectroscopy.pptx food analysis technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Advanced methodologies resolving dimensionality complications for autism neur...
The AUB Centre for AI in Media Proposal.docx
Understanding_Digital_Forensics_Presentation.pptx
Review of recent advances in non-invasive hemoglobin estimation
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
MYSQL Presentation for SQL database connectivity
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Per capita expenditure prediction using model stacking based on satellite ima...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
sap open course for s4hana steps from ECC to s4
Chapter 3 Spatial Domain Image Processing.pdf
Big Data Technologies - Introduction.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

Python Training Topics

  • 1. WELCOME TO VIBRANT TECHNOLOGIES & COMPUTERS Python Training Topics
  • 3. What is Python?  A programming language with strong similarities to PERL, but with powerful typing and object oriented features.  Commonly used for producing HTML content on websites. Great for text files.  Useful built-in types (lists, dictionaries).  Clean syntax, powerful extensions.
  • 4. Why Python?  Natural Language ToolKit  Ease of use; interpreter  AI Processing: Symbolic  Python’s built-in datatypes for strings, lists, and more.  Java or C++ require the use of special classes for this.  AI Processing: Statistical  Python has strong numeric processing capabilities: matrix operations, etc.  Suitable for probability and machine learning code.
  • 5. Learning Python  Unfortunately, we won’t have time to cover all of Python in class; so, we’re just going to go over ome highlights.  You’ll need to learn more on your own.  Homework 0 asks you to install Python or get comfortable using it here in the lab. It also asks you to read some online Python tutorials.  Later homeworks will include Python programming exercises to help you practice.
  • 6. Installing Python  Python is installed on the PCs in 156.  Python for Win/Mac/Unix/Linux is available from www.python.org.  Generally an easy install.  On macs, already part of OS X.  For NLTK you need Python 2.3 or higher.  GUI development environment: IDLE. Credits: http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.htm
  • 7. IDLE Development Environment  Shell for interactive evaluation.  Text editor with color-coding and smart indenting for creating python files.  Menu commands for changing system settings and running files.  We will use IDLE in class.
  • 8. Basic Datatypes  Integers (default for numbers) z = 5 / 2 # Answer is 2, integer division.  Floats x = 3.456  Strings Can use “” or ‘’ to specify. “abc” ‘abc’ (Same thing.) Unmatched ones can occur within the string. “matt’s” Use triple double-quotes for multi-line strings or strings than contain both ‘ and “ inside of them: “““a‘b“c”””
  • 9. Whitespace  Whitespace is meaningful in Python: especially indentation and placement of newlines.  Use a newline to end a line of code. (Not a semicolon like in C++ or Java.) (Use when must go to next line prematurely.)  No braces { } to mark blocks of code in Python… Use consistent indentation instead. The first line with a new indentation is considered outside of the block.  Often a colon appears at the start of a new block. (We’ll see this later for function and class definitions.)
  • 10. Comments  Start comments with # – the rest of line is ignored.  Can include a “documentation string” as the first line of any new function or class that you define.  The development environment, debugger, and other tools use it: it’s good style to include one. def my_function(x, y): “““This is the docstring. This function does blah blah blah.””” # The code would go here...
  • 11. Printing with Python  You can print a string to the screen using “print.”  Using the % string operator in combination with the print command, we can format our output text. >>> print “%s xyz %d” % (“abc”, 34) abc xyz 34 “Print” automatically adds a newline to the end of the string. If you include a list of strings, it will concatenate them with a space between them. >>> print “abc” >>> print “abc”, “def” abc abc def