SlideShare a Scribd company logo
Introduction to PythonIntroduction to Python
ProgrammingProgramming
Why Python?Why Python?
 Python is what is referred to as an object-oriented programming
language (OOP)
 Python is a general purpose programming language. That means you
can use Python to write code for a number of programming tasks.
◦ Google search engine
◦ Gaming
◦ Processing financial
transactions
◦ Data Analytics
◦ Physical Programming
 Simple
 Less Syntax
 Extensive User Community
 Interpreted
Interpreted?Interpreted?
Python is interpreted, which means that
python code is translated and executed by
an interpreter one statement at a time.
This means you can run commands/code
on the command prompt…
Through a command
prompt with a text file…
Using an IDE
What Does It Look Like?What Does It Look Like?
Parts of a Python ProgramParts of a Python Program
Def: Source Code is the program text
entered into an interpreter by the
programmer.
◦ The saved file is referred to as, the source file.
◦ The main file in a python program, called main
◦ Can program on the command prompt
The extension to a python source file is “.py”
◦ Xcel - .xls
◦ Power Point - .ppt
Two main parts to a source file
◦ Modules
◦ Main code
Good programming proclamationsGood programming proclamations
Using comments to denote programs or
sections of code
◦ A comment beginning with # is called a single-line comment
because it terminates at the end of the current line.
◦ You also may use a multi-line comment—possibly containing
many lines—begins with ’’’ and ends with ’’’.
You use blank lines, space characters and tab characters
(i.e., “tabs”) to make programs easier to read.
◦ Together, these characters are known as white space.
◦ White-space characters are USUALLY ignored by the interpreter.
◦ Python has its own rules with white space
ModulesModules
 A module is a python source file that has prewritten
python code.
 These predefined files allow users to utilize code that has
been previously developed.
◦ Don’t have to recreate the wheel, just use the wheel and
improve on the technology.
 math
 time
 Gpiozero
 Os
 Code: Importing modules
 import module_name
 from module_name import class_name
ExpressionsExpressions
• A programming expression is a
combination of symbols to represent a
value.
• One side of an equation
• Ex.
• 5+7
• False
• print()
• led.on()
Printing a Line of TextPrinting a Line of Text
print(“ “)
Anything placed inside the quotes will be printed on the screen
upon execution of the print command.
Manipulating TimeManipulating Time
The time module is a popular module which
provides functions for working with times and
converting between them.
◦ sleep
◦ local time
◦ epoch time
Code:
◦ Importing time module
 import time
◦ Using time functions
 time.sleep(#)
 time.localtime(time.time())
Manipulating LED’sManipulating LED’s
 The Raspberry Pi comes with a library RPi.GPIO that allow
the manipulation of GPIO pins: s
◦ Setup pins as inputs or outputs
◦ Read inputs
◦ Set output levels
 However, gpiozero is a wrapper library that is built on top
of RPi.GPIO to provide a simpler interface to manipulate
the pins.
 Code:
◦ Importing gpiozero module
 import gpiozero
◦ Using led functions and objects
 LED(pin#).on()
 LED(pin#).off()
 LED(pin#).blink()
CheckpointCheckpoint
1. What is an IDE?
2. What is a comment and its importance?
3. How is white space used in
programming?
4. What are modules?
5. Name 2 modules

More Related Content

What's hot

Introduction to Python Basics Programming
Introduction to Python Basics ProgrammingIntroduction to Python Basics Programming
Introduction to Python Basics Programming
Collaboration Technologies
 
Python
PythonPython
Python programming introduction
Python programming introductionPython programming introduction
Python programming introduction
Siddique Ibrahim
 
Top python interview question and answer
Top python interview question and answerTop python interview question and answer
Top python interview question and answer
Ankita Singh
 
Python programming
Python programmingPython programming
Python programming
Prof. Dr. K. Adisesha
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
Akhil Kaushik
 
Python 101
Python 101Python 101
Python 101
Ahmet SEĞMEN
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programmingKiran Vadakkath
 
2018 20 best id es for python programming
2018 20 best id es for python programming2018 20 best id es for python programming
2018 20 best id es for python programming
SyedBrothersRealEsta
 
Introduction to Python Programing
Introduction to Python ProgramingIntroduction to Python Programing
Introduction to Python Programing
sameer patil
 
Python final ppt
Python final pptPython final ppt
Python final ppt
Ripal Ranpara
 
Python part1
Python part1Python part1
Python part1
Vishal Dutt
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
Sofian Hadiwijaya
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Jaya Kumari
 
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAChapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Maulik Borsaniya
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Agung Wahyudi
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
Mohammad Javad Beheshtian
 
Python basic
Python basicPython basic
Python basic
radhikaadroja
 

What's hot (20)

Introduction to Python Basics Programming
Introduction to Python Basics ProgrammingIntroduction to Python Basics Programming
Introduction to Python Basics Programming
 
Python
PythonPython
Python
 
Python programming introduction
Python programming introductionPython programming introduction
Python programming introduction
 
Top python interview question and answer
Top python interview question and answerTop python interview question and answer
Top python interview question and answer
 
Python programming
Python programmingPython programming
Python programming
 
Python Tutorial Part 2
Python Tutorial Part 2Python Tutorial Part 2
Python Tutorial Part 2
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
Python 101
Python 101Python 101
Python 101
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
2018 20 best id es for python programming
2018 20 best id es for python programming2018 20 best id es for python programming
2018 20 best id es for python programming
 
Introduction to Python Programing
Introduction to Python ProgramingIntroduction to Python Programing
Introduction to Python Programing
 
Python final ppt
Python final pptPython final ppt
Python final ppt
 
Python part1
Python part1Python part1
Python part1
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYAChapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
Python basic
Python basicPython basic
Python basic
 

Similar to Intro to Python

Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academy
TIB Academy
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
VaibhavKumarSinghkal
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
Sujith Kumar
 
Introduction python
Introduction pythonIntroduction python
Introduction python
Jumbo Techno e_Learning
 
ppt notes for python language variable data types
ppt notes for python language variable data typesppt notes for python language variable data types
ppt notes for python language variable data types
SukhpreetSingh519414
 
Python Tutorial | Python Programming Language
Python Tutorial | Python Programming LanguagePython Tutorial | Python Programming Language
Python Tutorial | Python Programming Language
anaveenkumar4
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdf
ANIKULSAIKH
 
Python Programming Draft PPT.pptx
Python Programming Draft PPT.pptxPython Programming Draft PPT.pptx
Python Programming Draft PPT.pptx
LakshmiNarayanaReddy48
 
INTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHONINTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHON
RuchiNagar3
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
gabriellekuruvilla
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
michaelaaron25322
 
4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx
Gnanesh12
 
637b4894085c4_ppt.pptx
637b4894085c4_ppt.pptx637b4894085c4_ppt.pptx
637b4894085c4_ppt.pptx
Arjun123Bagri
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
R.h. Himel
 
Introduction to Python Basics Programming
Introduction to Python Basics ProgrammingIntroduction to Python Basics Programming
Introduction to Python Basics Programming
Raveendra R
 
MODULE 1.pptx
MODULE 1.pptxMODULE 1.pptx
MODULE 1.pptx
KPDDRAVIDIAN
 
Python Programming
Python ProgrammingPython Programming
Python Programming
RenieMathews
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installing
Mohd Sajjad
 
Ways To Become A Good Python Developer
Ways To Become A Good Python DeveloperWays To Become A Good Python Developer
Ways To Become A Good Python Developer
CodeMonk
 
INTRODUCTION TO PYTHON PROGRAMMING .pptx
INTRODUCTION TO PYTHON PROGRAMMING .pptxINTRODUCTION TO PYTHON PROGRAMMING .pptx
INTRODUCTION TO PYTHON PROGRAMMING .pptx
SanthoshRajan16
 

Similar to Intro to Python (20)

Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academy
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Introduction python
Introduction pythonIntroduction python
Introduction python
 
ppt notes for python language variable data types
ppt notes for python language variable data typesppt notes for python language variable data types
ppt notes for python language variable data types
 
Python Tutorial | Python Programming Language
Python Tutorial | Python Programming LanguagePython Tutorial | Python Programming Language
Python Tutorial | Python Programming Language
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdf
 
Python Programming Draft PPT.pptx
Python Programming Draft PPT.pptxPython Programming Draft PPT.pptx
Python Programming Draft PPT.pptx
 
INTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHONINTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHON
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
 
4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx
 
637b4894085c4_ppt.pptx
637b4894085c4_ppt.pptx637b4894085c4_ppt.pptx
637b4894085c4_ppt.pptx
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
 
Introduction to Python Basics Programming
Introduction to Python Basics ProgrammingIntroduction to Python Basics Programming
Introduction to Python Basics Programming
 
MODULE 1.pptx
MODULE 1.pptxMODULE 1.pptx
MODULE 1.pptx
 
Python Programming
Python ProgrammingPython Programming
Python Programming
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installing
 
Ways To Become A Good Python Developer
Ways To Become A Good Python DeveloperWays To Become A Good Python Developer
Ways To Become A Good Python Developer
 
INTRODUCTION TO PYTHON PROGRAMMING .pptx
INTRODUCTION TO PYTHON PROGRAMMING .pptxINTRODUCTION TO PYTHON PROGRAMMING .pptx
INTRODUCTION TO PYTHON PROGRAMMING .pptx
 

More from primeteacher32

Software Development Life Cycle
Software Development Life CycleSoftware Development Life Cycle
Software Development Life Cycle
primeteacher32
 
Variable Scope
Variable ScopeVariable Scope
Variable Scope
primeteacher32
 
Returning Data
Returning DataReturning Data
Returning Data
primeteacher32
 
Intro to Functions
Intro to FunctionsIntro to Functions
Intro to Functions
primeteacher32
 
Introduction to GUIs with guizero
Introduction to GUIs with guizeroIntroduction to GUIs with guizero
Introduction to GUIs with guizero
primeteacher32
 
Function Parameters
Function ParametersFunction Parameters
Function Parameters
primeteacher32
 
Nested Loops
Nested LoopsNested Loops
Nested Loops
primeteacher32
 
Conditional Loops
Conditional LoopsConditional Loops
Conditional Loops
primeteacher32
 
Introduction to Repetition Structures
Introduction to Repetition StructuresIntroduction to Repetition Structures
Introduction to Repetition Structures
primeteacher32
 
Input Validation
Input ValidationInput Validation
Input Validation
primeteacher32
 
Windows File Systems
Windows File SystemsWindows File Systems
Windows File Systems
primeteacher32
 
Nesting Conditionals
Nesting ConditionalsNesting Conditionals
Nesting Conditionals
primeteacher32
 
Conditionals
ConditionalsConditionals
Conditionals
primeteacher32
 
Variables and Statements
Variables and StatementsVariables and Statements
Variables and Statements
primeteacher32
 
Variables and User Input
Variables and User InputVariables and User Input
Variables and User Input
primeteacher32
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
primeteacher32
 
Hardware vs. Software Presentations
Hardware vs. Software PresentationsHardware vs. Software Presentations
Hardware vs. Software Presentations
primeteacher32
 
Block chain security
Block chain securityBlock chain security
Block chain security
primeteacher32
 
Hashes
HashesHashes
System Administration
System AdministrationSystem Administration
System Administration
primeteacher32
 

More from primeteacher32 (20)

Software Development Life Cycle
Software Development Life CycleSoftware Development Life Cycle
Software Development Life Cycle
 
Variable Scope
Variable ScopeVariable Scope
Variable Scope
 
Returning Data
Returning DataReturning Data
Returning Data
 
Intro to Functions
Intro to FunctionsIntro to Functions
Intro to Functions
 
Introduction to GUIs with guizero
Introduction to GUIs with guizeroIntroduction to GUIs with guizero
Introduction to GUIs with guizero
 
Function Parameters
Function ParametersFunction Parameters
Function Parameters
 
Nested Loops
Nested LoopsNested Loops
Nested Loops
 
Conditional Loops
Conditional LoopsConditional Loops
Conditional Loops
 
Introduction to Repetition Structures
Introduction to Repetition StructuresIntroduction to Repetition Structures
Introduction to Repetition Structures
 
Input Validation
Input ValidationInput Validation
Input Validation
 
Windows File Systems
Windows File SystemsWindows File Systems
Windows File Systems
 
Nesting Conditionals
Nesting ConditionalsNesting Conditionals
Nesting Conditionals
 
Conditionals
ConditionalsConditionals
Conditionals
 
Variables and Statements
Variables and StatementsVariables and Statements
Variables and Statements
 
Variables and User Input
Variables and User InputVariables and User Input
Variables and User Input
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Hardware vs. Software Presentations
Hardware vs. Software PresentationsHardware vs. Software Presentations
Hardware vs. Software Presentations
 
Block chain security
Block chain securityBlock chain security
Block chain security
 
Hashes
HashesHashes
Hashes
 
System Administration
System AdministrationSystem Administration
System Administration
 

Recently uploaded

New Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdfNew Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdf
Dr. Mary Askew
 
How to Master LinkedIn for Career and Business
How to Master LinkedIn for Career and BusinessHow to Master LinkedIn for Career and Business
How to Master LinkedIn for Career and Business
ideatoipo
 
Full Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptxFull Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptx
mmorales2173
 
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
yuhofha
 
Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!
LukeRoyak
 
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
pxyhy
 
134. Reviewer Certificate in Computer Science
134. Reviewer Certificate in Computer Science134. Reviewer Certificate in Computer Science
134. Reviewer Certificate in Computer Science
Manu Mitra
 
Chapters 3 Contracts.pptx Chapters 3 Contracts.pptx
Chapters 3  Contracts.pptx Chapters 3  Contracts.pptxChapters 3  Contracts.pptx Chapters 3  Contracts.pptx
Chapters 3 Contracts.pptx Chapters 3 Contracts.pptx
Sheldon Byron
 
DIGITAL MARKETING COURSE IN CHENNAI.pptx
DIGITAL MARKETING COURSE IN CHENNAI.pptxDIGITAL MARKETING COURSE IN CHENNAI.pptx
DIGITAL MARKETING COURSE IN CHENNAI.pptx
FarzanaRbcomcs
 
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaInteractive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
23211a7274
 
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
foismail170
 
一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理
yuhofha
 
135. Reviewer Certificate in Journal of Engineering
135. Reviewer Certificate in Journal of Engineering135. Reviewer Certificate in Journal of Engineering
135. Reviewer Certificate in Journal of Engineering
Manu Mitra
 
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
atwvhyhm
 
Digital Marketing Training In Bangalore
Digital  Marketing Training In BangaloreDigital  Marketing Training In Bangalore
Digital Marketing Training In Bangalore
nidm599
 
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
foismail170
 
Exploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical CommunicatorsExploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical Communicators
Ben Woelk, CISSP, CPTC
 
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
larisashrestha558
 
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Dirk Spencer Corporate Recruiter LION
 
How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring ChapterHow Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
Hector Del Castillo, CPM, CPMM
 

Recently uploaded (20)

New Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdfNew Explore Careers and College Majors 2024.pdf
New Explore Careers and College Majors 2024.pdf
 
How to Master LinkedIn for Career and Business
How to Master LinkedIn for Career and BusinessHow to Master LinkedIn for Career and Business
How to Master LinkedIn for Career and Business
 
Full Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptxFull Sail_Morales_Michael_SMM_2024-05.pptx
Full Sail_Morales_Michael_SMM_2024-05.pptx
 
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
一比一原版(TMU毕业证)多伦多都会大学毕业证如何办理
 
Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!Luke Royak's Personal Brand Exploration!
Luke Royak's Personal Brand Exploration!
 
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
一比一原版(UVic毕业证)维多利亚大学毕业证如何办理
 
134. Reviewer Certificate in Computer Science
134. Reviewer Certificate in Computer Science134. Reviewer Certificate in Computer Science
134. Reviewer Certificate in Computer Science
 
Chapters 3 Contracts.pptx Chapters 3 Contracts.pptx
Chapters 3  Contracts.pptx Chapters 3  Contracts.pptxChapters 3  Contracts.pptx Chapters 3  Contracts.pptx
Chapters 3 Contracts.pptx Chapters 3 Contracts.pptx
 
DIGITAL MARKETING COURSE IN CHENNAI.pptx
DIGITAL MARKETING COURSE IN CHENNAI.pptxDIGITAL MARKETING COURSE IN CHENNAI.pptx
DIGITAL MARKETING COURSE IN CHENNAI.pptx
 
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaaInteractive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
Interactive Dictionary AIDS-B.pptx aaaaaaaaaaaaaaaaaaaaaaaaaa
 
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
欧洲杯投注网站-欧洲杯投注网站推荐-欧洲杯投注网站| 立即访问【ac123.net】
 
一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理一比一原版(YU毕业证)约克大学毕业证如何办理
一比一原版(YU毕业证)约克大学毕业证如何办理
 
135. Reviewer Certificate in Journal of Engineering
135. Reviewer Certificate in Journal of Engineering135. Reviewer Certificate in Journal of Engineering
135. Reviewer Certificate in Journal of Engineering
 
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
原版制作(RMIT毕业证书)墨尔本皇家理工大学毕业证在读证明一模一样
 
Digital Marketing Training In Bangalore
Digital  Marketing Training In BangaloreDigital  Marketing Training In Bangalore
Digital Marketing Training In Bangalore
 
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
欧洲杯买球平台-欧洲杯买球平台推荐-欧洲杯买球平台| 立即访问【ac123.net】
 
Exploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical CommunicatorsExploring Career Paths in Cybersecurity for Technical Communicators
Exploring Career Paths in Cybersecurity for Technical Communicators
 
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
皇冠体育- 皇冠体育官方网站- CROWN SPORTS| 立即访问【ac123.net】
 
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
Transferable Skills - Your Roadmap - Part 1 and 2 - Dirk Spencer Senior Recru...
 
How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring ChapterHow Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
How Mentoring Elevates Your PM Career | PMI Silver Spring Chapter
 

Intro to Python

  • 1. Introduction to PythonIntroduction to Python ProgrammingProgramming
  • 2. Why Python?Why Python?  Python is what is referred to as an object-oriented programming language (OOP)  Python is a general purpose programming language. That means you can use Python to write code for a number of programming tasks. ◦ Google search engine ◦ Gaming ◦ Processing financial transactions ◦ Data Analytics ◦ Physical Programming  Simple  Less Syntax  Extensive User Community  Interpreted
  • 3. Interpreted?Interpreted? Python is interpreted, which means that python code is translated and executed by an interpreter one statement at a time. This means you can run commands/code on the command prompt… Through a command prompt with a text file… Using an IDE
  • 4. What Does It Look Like?What Does It Look Like?
  • 5. Parts of a Python ProgramParts of a Python Program Def: Source Code is the program text entered into an interpreter by the programmer. ◦ The saved file is referred to as, the source file. ◦ The main file in a python program, called main ◦ Can program on the command prompt The extension to a python source file is “.py” ◦ Xcel - .xls ◦ Power Point - .ppt Two main parts to a source file ◦ Modules ◦ Main code
  • 6. Good programming proclamationsGood programming proclamations Using comments to denote programs or sections of code ◦ A comment beginning with # is called a single-line comment because it terminates at the end of the current line. ◦ You also may use a multi-line comment—possibly containing many lines—begins with ’’’ and ends with ’’’. You use blank lines, space characters and tab characters (i.e., “tabs”) to make programs easier to read. ◦ Together, these characters are known as white space. ◦ White-space characters are USUALLY ignored by the interpreter. ◦ Python has its own rules with white space
  • 7. ModulesModules  A module is a python source file that has prewritten python code.  These predefined files allow users to utilize code that has been previously developed. ◦ Don’t have to recreate the wheel, just use the wheel and improve on the technology.  math  time  Gpiozero  Os  Code: Importing modules  import module_name  from module_name import class_name
  • 8. ExpressionsExpressions • A programming expression is a combination of symbols to represent a value. • One side of an equation • Ex. • 5+7 • False • print() • led.on()
  • 9. Printing a Line of TextPrinting a Line of Text print(“ “) Anything placed inside the quotes will be printed on the screen upon execution of the print command.
  • 10. Manipulating TimeManipulating Time The time module is a popular module which provides functions for working with times and converting between them. ◦ sleep ◦ local time ◦ epoch time Code: ◦ Importing time module  import time ◦ Using time functions  time.sleep(#)  time.localtime(time.time())
  • 11. Manipulating LED’sManipulating LED’s  The Raspberry Pi comes with a library RPi.GPIO that allow the manipulation of GPIO pins: s ◦ Setup pins as inputs or outputs ◦ Read inputs ◦ Set output levels  However, gpiozero is a wrapper library that is built on top of RPi.GPIO to provide a simpler interface to manipulate the pins.  Code: ◦ Importing gpiozero module  import gpiozero ◦ Using led functions and objects  LED(pin#).on()  LED(pin#).off()  LED(pin#).blink()
  • 12. CheckpointCheckpoint 1. What is an IDE? 2. What is a comment and its importance? 3. How is white space used in programming? 4. What are modules? 5. Name 2 modules

Editor's Notes

  1. Common elements in programming languages: Key Words Programmer-Defined Identifiers Operators Punctuation Syntax
  2. Where have you heard of expressions before? Math class and what were they