SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Beginning
Programming
Agenda:
• Learn what Python is and what it is capable of doing.
• Install Python’s IDE for Windows and gain an appreciation of the Python shell.
• Use calculations, variables, strings, lists, if statements, and more.
• Discover Python’s built-in functions and understand modules.
• Create simple programs to build on later.
What is computer programming?
• A set of commands a computer understands – like a recipe.
• Computer programs can help cure diseases; drive cars; create video
games; make animated movies/graphics; build websites and apps; and
much more.
• Basic coding concepts are used by most every program and most every
programmer.
• To learn more visit https://goo.gl/LYxa7V.
What is a programming language?
• A programming language is a set of rules that provides a way of telling
a computer:
• What operations to perform
• Communicating an algorithm
• Receives an input from the user and generates an output.
• A programming language is a system for describing a computation
(math) or algorithms (logic) in a machine-readable and human-
readable form.
• Has words, symbols, and grammatical rules (natural language)
• Grammatical rules = syntax
• Each language has a different set of syntax rules
• Has semantics (meaning)
Slide courtesy of Brian Pichman
Why learn to code?
• Why not?
• Learn the importance of clarity/brevity of expression.
• Be able to think and problem solve more accurately.
• Have a better understanding of how technology works.
• Create a tool that can make life easier and/or fun.
What is Python and what can it do?
• Python was named after Monty Python’s Flying Circus TV show.
• Python is an interpreted high-level programming language for general-
purpose programming.
• Interpreted means that the interpreter (embedded in Idle) can execute
instructions directly without compiling.
• Compiling is a translation from source code to a lower-level language (e.g.,
machine code)
• High-level programming resembles human languages, not machine languages, and
are easier to read and write.
• Python has helped build some famous applications like YouTube,
DropBox, Instagram, BitTorrent, Spotify, Reddit etc.
Python helped build Quora too!
Read more: https://goo.gl/nr8BZk
Raspberry Pi (Python) programming
Blinking LED code at: http://goo.gl/O3yozd
https://www.python.org/downloads
Installing Python
https://docs.python.org/3.6/tutorial/index.html
IDLE - Integrated DeveLopment Environment)
The third line is a print statement (function), which prints the stored name “Hello World.”
Calculations,
variables, strings,
and lists.
Review
Calculations:
20 * 6.789
250 – 45
40 / 8.9
5 + 30 * 20
(5 + 30) * 20
((5+30) * 20) / 10
Variables:
chad = 100
sam = chad
print(sam)
myscore = 1000
message = 'I scored %s
points'
print(message %
myscore)
Lists:
music_list = ['The Beatles', 'Led
Zeppelin' , 'Pink Floyd' , 'Mr.
Bungle']
print(music_list)
print(music_list[3])
music_list.append('The Clash')
>>> print(music_list)
Source: https://goo.gl/JS73o4
myfunc is the name of the function.
myname is the parameter (i.e., a variable
while the function is being used).
‘Chad’ is a string.
This function is defined by the def statement.
Functions
• A function is a piece of code that tells Python to do something. It is a type
of procedure or routine and usually returns a value. Functions are used to
utilize code in more than one place in a program.
• A procedure preforms an operation, but typically doesn’t provide a value.
• Most languages have pre-built or pre-defined functions in its library.
• For instance, the “delete” function means to “remove”. You don’t have to code what
“remove” does; only what to remove.
Defining a function in Python
If statements,
functions,
loops,
modules.
Review
Functions:
range()
list()
Pen
https://docs.pyt
hon.org/3/librar
y/functions.html
Modules:
turtle
https://docs.pytho
n.org/3/py-
modindex.html
If statements:
If age > 20:
== equal to
!= not equal to
>= Greater than or equal to
<= Less than or equal to
Loops:
for x in range(0,5):
print(“Hello
world”)
Creating Simple Programs
A place to “host and review code, manage projects, and
build software alongside millions of other developers.”
Explore …
Play Tic Tac Toe Against AI
Code available at https://github.com/geekcomputers/Python
Flow Chart
Image source: https://goo.gl/mo7NY
Creating Madlibs
variable function string
Some great resources to help you learn to code
Read more at http://goo.gl/Hgy16A
.com
Learn to code interactively, for free.
http://www.oeconsortium.org/
https://www.coursera.org/
https://www.codeavengers.com/
https://www.khanacademy.org
https://teamtreehouse.com/
https://www.codeschool.com/
http://coderdojo.com
http://www.slideshare.net/chadmairn
@cmairn
Contact me!

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Python basics
Python basicsPython basics
Python basics
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
Python Course | Python Programming | Python Tutorial | Python Training | EdurekaPython Course | Python Programming | Python Tutorial | Python Training | Edureka
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
 
Python - the basics
Python - the basicsPython - the basics
Python - the basics
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python final ppt
Python final pptPython final ppt
Python final ppt
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
 
Programming
ProgrammingProgramming
Programming
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python programming introduction
Python programming introductionPython programming introduction
Python programming introduction
 
Intro to Python Programming Language
Intro to Python Programming LanguageIntro to Python Programming Language
Intro to Python Programming Language
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 
Python Basics
Python BasicsPython Basics
Python Basics
 
Programming with Python
Programming with PythonProgramming with Python
Programming with Python
 
Python basics
Python basicsPython basics
Python basics
 
What is Python? | Edureka
What is Python? | EdurekaWhat is Python? | Edureka
What is Python? | Edureka
 
Python Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | EdurekaPython Basics | Python Tutorial | Edureka
Python Basics | Python Tutorial | Edureka
 
Python ppt
Python pptPython ppt
Python ppt
 

Ähnlich wie Beginning Python Programming

python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdf
gmadhu8
 
Introduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptxIntroduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptx
HassanShah396906
 

Ähnlich wie Beginning Python Programming (20)

An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()An Introduction To Python - Python, Print()
An Introduction To Python - Python, Print()
 
Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academy
 
Py4 inf 01-intro
Py4 inf 01-introPy4 inf 01-intro
Py4 inf 01-intro
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
MODULE 1.pptx
MODULE 1.pptxMODULE 1.pptx
MODULE 1.pptx
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptx
 
Introduction python
Introduction pythonIntroduction python
Introduction python
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
 
Python Programming Draft PPT.pptx
Python Programming Draft PPT.pptxPython Programming Draft PPT.pptx
Python Programming Draft PPT.pptx
 
py4inf-01-intro.ppt
py4inf-01-intro.pptpy4inf-01-intro.ppt
py4inf-01-intro.ppt
 
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
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to Coding
 
4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
 
Python basics
Python basicsPython basics
Python basics
 
python into.pptx
python into.pptxpython into.pptx
python into.pptx
 
python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdf
 
Introduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptxIntroduction to Python – Learn Python Programming.pptx
Introduction to Python – Learn Python Programming.pptx
 

Mehr von St. Petersburg College

Mehr von St. Petersburg College (20)

Introducing Immersive Technologies for Libraries
Introducing Immersive Technologies for Libraries  Introducing Immersive Technologies for Libraries
Introducing Immersive Technologies for Libraries
 
Introducing How to Build a Personal Voice Assistant (AIY Edition)
Introducing How to Build a Personal Voice Assistant (AIY Edition) Introducing How to Build a Personal Voice Assistant (AIY Edition)
Introducing How to Build a Personal Voice Assistant (AIY Edition)
 
360° Tours and More
360° Tours and More360° Tours and More
360° Tours and More
 
Taking the Magical Leap with Immersive Technologies in Libraries
Taking the Magical Leap with Immersive Technologies in LibrariesTaking the Magical Leap with Immersive Technologies in Libraries
Taking the Magical Leap with Immersive Technologies in Libraries
 
Open Education Resources in Libraries
Open Education Resources in LibrariesOpen Education Resources in Libraries
Open Education Resources in Libraries
 
How to Repurpose Library Space: Listening Lab Edition
How to Repurpose Library Space: Listening Lab EditionHow to Repurpose Library Space: Listening Lab Edition
How to Repurpose Library Space: Listening Lab Edition
 
Using CoSpaces Edu to Create Virtual and Augmented Reality Experiences
Using CoSpaces Edu to Create Virtual and Augmented Reality ExperiencesUsing CoSpaces Edu to Create Virtual and Augmented Reality Experiences
Using CoSpaces Edu to Create Virtual and Augmented Reality Experiences
 
Understanding Artificial Intelligence
Understanding Artificial IntelligenceUnderstanding Artificial Intelligence
Understanding Artificial Intelligence
 
Web Design Trends: 2018 Edition
Web Design Trends: 2018 EditionWeb Design Trends: 2018 Edition
Web Design Trends: 2018 Edition
 
What’s New With 3D Design and Printing?
What’s New With 3D Design and Printing?What’s New With 3D Design and Printing?
What’s New With 3D Design and Printing?
 
Creating a Program to Assist Users Cutting Cable
Creating a Program to Assist Users Cutting CableCreating a Program to Assist Users Cutting Cable
Creating a Program to Assist Users Cutting Cable
 
Understanding Artificial Intelligence
Understanding Artificial Intelligence Understanding Artificial Intelligence
Understanding Artificial Intelligence
 
3D Design Fundamentals
3D Design Fundamentals3D Design Fundamentals
3D Design Fundamentals
 
STEM Demystified
STEM DemystifiedSTEM Demystified
STEM Demystified
 
Learn to Compose, Record, and Produce Songs and Podcasts Using GarageBand
Learn to Compose, Record, and Produce Songs and Podcasts Using GarageBandLearn to Compose, Record, and Produce Songs and Podcasts Using GarageBand
Learn to Compose, Record, and Produce Songs and Podcasts Using GarageBand
 
Open Education Resources in Libraries
Open Education Resources in LibrariesOpen Education Resources in Libraries
Open Education Resources in Libraries
 
Learning Kodu: Basic Video Game Design for Kids
Learning Kodu: Basic Video Game Design for KidsLearning Kodu: Basic Video Game Design for Kids
Learning Kodu: Basic Video Game Design for Kids
 
Learn to Code and Have Fun Doing It!
Learn to Code and Have Fun Doing It! Learn to Code and Have Fun Doing It!
Learn to Code and Have Fun Doing It!
 
How to Think in the Information Age: Finding Facts in a Post-Truth World
How to Think in the Information Age: Finding Facts in a Post-Truth WorldHow to Think in the Information Age: Finding Facts in a Post-Truth World
How to Think in the Information Age: Finding Facts in a Post-Truth World
 
Technologies to Watch: 2017 Edition
Technologies to Watch: 2017 EditionTechnologies to Watch: 2017 Edition
Technologies to Watch: 2017 Edition
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Beginning Python Programming