SlideShare uma empresa Scribd logo
1 de 20
Algorithm
What is an algorithm?
“A set of rules to be
followed in problem
solving operations.”
or “A Recipe”
Input   Algorithm   Output
Input   Algorithm               Output
        “A set of rules to be
        followed in problem
        solving operations.”
Input                Algorithm               Output
•   2 slices bread
                           “A set of rules to be
•   1 tbsp peanut butter   followed in problem
•   2 tsp strawberry jam   solving operations.”
Input                Algorithm               Output
•   2 slices bread
                           “A set of rules to be
•   1 tbsp peanut butter   followed in problem
•   2 tsp strawberry jam   solving operations.”
Input                Algorithm   Output
•   2 slices bread

•   1 tbsp peanut butter

•   2 tsp strawberry jam
Selena & Michelle’s
  PBJ algorithm
How many steps do you think it will
            take?
There’s more than
 one way to do it.
"""
(C) Gerold Penz)
Python can be simple, too :-)
"""

for quant in range(99, 0, -1):
  if quant > 1:
    print quant, "bottles of beer on the wall,", quant, "bottles of beer."
    if quant > 2:
      suffix = str(quant - 1) + " bottles of beer on the wall."
    else:
      suffix = "1 bottle of beer on the wall."
  elif quant == 1:
    print "1 bottle of beer on the wall, 1 bottle of beer."
    suffix = "no more beer on the wall!"
  print "Take one down, pass it around,", suffix
  print "--"
# (c) Barbara Shaurette

def bottles():
 for i in reversed(range(100)):
  if i > 0:
    b = "bottles"
    if i == 1: b = "bottle"
    print i, b, "of beer on the wall,", 
      i, b, "of beer"
    print "Take one down, pass it around,", 
      i-1, "bottles of beer on the wallnr"

bottles()
Your algorithms
Example: Get from
the airport to home.
“The taxi algorithm”

• Go to the taxi stand.
• Get in a taxi.
• Give the driver my address.
“The call-me
         algorithm”

• When your plane arrives, call my cell
  phone.
• Meet me outside baggage claim.
“The rent-a-car
       algorithm”

• Take the shuttle to the rental car place.
• Rent a car.
• Follow the directions to get to my
  house.
“The bus algorithm”

• Outside baggage claim, catch bus
  number 70.
• Transfer to bus 14 on Main Street.
• Get off on Elm street.
• Walk two blocks north to my house.
All get you to where
  you need to go.

Mais conteúdo relacionado

Mais procurados

歐普藝術教材
歐普藝術教材歐普藝術教材
歐普藝術教材MK Chou
 
Henri matisse---cut-outs---lesson
Henri matisse---cut-outs---lessonHenri matisse---cut-outs---lesson
Henri matisse---cut-outs---lessonclaseinglesmames
 
Application of computer graphic
Application of computer graphicApplication of computer graphic
Application of computer graphicalldesign
 
THE GENERATION OF COMPUTER by P.Jeyapiranavan
THE GENERATION OF COMPUTER by P.JeyapiranavanTHE GENERATION OF COMPUTER by P.Jeyapiranavan
THE GENERATION OF COMPUTER by P.Jeyapiranavanp.j. pranavan
 
Visual Interface Design HCI presentation By Uzair Ahmad
Visual Interface Design HCI presentation By Uzair Ahmad Visual Interface Design HCI presentation By Uzair Ahmad
Visual Interface Design HCI presentation By Uzair Ahmad UzairAhmad81
 
Natural Language Interface: Advantages & Dis-Advantages
Natural Language Interface: Advantages & Dis-AdvantagesNatural Language Interface: Advantages & Dis-Advantages
Natural Language Interface: Advantages & Dis-AdvantagesLaxmiMPriya
 
Still life drawing
Still life drawingStill life drawing
Still life drawingJason Eoff
 

Mais procurados (20)

Lettering
LetteringLettering
Lettering
 
歐普藝術教材
歐普藝術教材歐普藝術教材
歐普藝術教材
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphics
 
Halftones
HalftonesHalftones
Halftones
 
Greek Pottery
Greek PotteryGreek Pottery
Greek Pottery
 
Henri matisse---cut-outs---lesson
Henri matisse---cut-outs---lessonHenri matisse---cut-outs---lesson
Henri matisse---cut-outs---lesson
 
Application of computer graphic
Application of computer graphicApplication of computer graphic
Application of computer graphic
 
cleanup.pptx
cleanup.pptxcleanup.pptx
cleanup.pptx
 
Basic sketching
Basic sketchingBasic sketching
Basic sketching
 
Line
LineLine
Line
 
Hand lettering
Hand letteringHand lettering
Hand lettering
 
THE GENERATION OF COMPUTER by P.Jeyapiranavan
THE GENERATION OF COMPUTER by P.JeyapiranavanTHE GENERATION OF COMPUTER by P.Jeyapiranavan
THE GENERATION OF COMPUTER by P.Jeyapiranavan
 
ANIMATION PPT
ANIMATION PPTANIMATION PPT
ANIMATION PPT
 
Character Design
Character DesignCharacter Design
Character Design
 
Visual Interface Design HCI presentation By Uzair Ahmad
Visual Interface Design HCI presentation By Uzair Ahmad Visual Interface Design HCI presentation By Uzair Ahmad
Visual Interface Design HCI presentation By Uzair Ahmad
 
Principles of animation
Principles of animationPrinciples of animation
Principles of animation
 
Natural Language Interface: Advantages & Dis-Advantages
Natural Language Interface: Advantages & Dis-AdvantagesNatural Language Interface: Advantages & Dis-Advantages
Natural Language Interface: Advantages & Dis-Advantages
 
Still life drawing
Still life drawingStill life drawing
Still life drawing
 
Bonavita
BonavitaBonavita
Bonavita
 
Pointillism
PointillismPointillism
Pointillism
 

Destaque

Introduction to Recipes for Agile Governance in the Enterprise (RAGE)
Introduction to Recipes for Agile Governance in the Enterprise (RAGE)Introduction to Recipes for Agile Governance in the Enterprise (RAGE)
Introduction to Recipes for Agile Governance in the Enterprise (RAGE)Cprime
 
Writing Chapters 1, 2, 3 of the Capstone Project Proposal Manuscript
Writing Chapters 1, 2, 3 of the Capstone Project Proposal ManuscriptWriting Chapters 1, 2, 3 of the Capstone Project Proposal Manuscript
Writing Chapters 1, 2, 3 of the Capstone Project Proposal ManuscriptSheryl Satorre
 
O que aconteceu com os mundos virtuais no ensino?
O que aconteceu com os mundos virtuais no ensino?O que aconteceu com os mundos virtuais no ensino?
O que aconteceu com os mundos virtuais no ensino?Neli Maria Mengalli
 
圖說人生哲理
圖說人生哲理圖說人生哲理
圖說人生哲理nonnon
 
Spring 3 - An Introduction
Spring 3 - An IntroductionSpring 3 - An Introduction
Spring 3 - An IntroductionThorsten Kamann
 
Class Project Pxgt 6110
Class Project Pxgt 6110Class Project Pxgt 6110
Class Project Pxgt 6110asmajuhan
 
你的桶子有多滿
你的桶子有多滿你的桶子有多滿
你的桶子有多滿nonnon
 
Baker Wedding Slideshow Review
Baker Wedding Slideshow ReviewBaker Wedding Slideshow Review
Baker Wedding Slideshow Reviewmattwjohnson
 
Even Start Flipbook
Even Start FlipbookEven Start Flipbook
Even Start Flipbookkkibbey
 
Data Mining Protein Structures' Topological Properties to Enhance Contact Ma...
Data Mining Protein Structures' Topological Properties  to Enhance Contact Ma...Data Mining Protein Structures' Topological Properties  to Enhance Contact Ma...
Data Mining Protein Structures' Topological Properties to Enhance Contact Ma...jaumebp
 
Lorelle at WordCamp 2008 - 260 Ways to Break WordPress
Lorelle at WordCamp 2008 - 260 Ways to Break WordPressLorelle at WordCamp 2008 - 260 Ways to Break WordPress
Lorelle at WordCamp 2008 - 260 Ways to Break WordPressLorelle VanFossen
 
La3 Computer Network
La3 Computer NetworkLa3 Computer Network
La3 Computer NetworkCma Mohd
 
Johannes Lars
Johannes LarsJohannes Lars
Johannes Larseka
 

Destaque (20)

Making Software Communities
Making Software CommunitiesMaking Software Communities
Making Software Communities
 
Introduction to Recipes for Agile Governance in the Enterprise (RAGE)
Introduction to Recipes for Agile Governance in the Enterprise (RAGE)Introduction to Recipes for Agile Governance in the Enterprise (RAGE)
Introduction to Recipes for Agile Governance in the Enterprise (RAGE)
 
Writing Chapters 1, 2, 3 of the Capstone Project Proposal Manuscript
Writing Chapters 1, 2, 3 of the Capstone Project Proposal ManuscriptWriting Chapters 1, 2, 3 of the Capstone Project Proposal Manuscript
Writing Chapters 1, 2, 3 of the Capstone Project Proposal Manuscript
 
Flex et Php Afup
Flex et Php AfupFlex et Php Afup
Flex et Php Afup
 
O que aconteceu com os mundos virtuais no ensino?
O que aconteceu com os mundos virtuais no ensino?O que aconteceu com os mundos virtuais no ensino?
O que aconteceu com os mundos virtuais no ensino?
 
Ch01
Ch01Ch01
Ch01
 
圖說人生哲理
圖說人生哲理圖說人生哲理
圖說人生哲理
 
Spring 3 - An Introduction
Spring 3 - An IntroductionSpring 3 - An Introduction
Spring 3 - An Introduction
 
Class Project Pxgt 6110
Class Project Pxgt 6110Class Project Pxgt 6110
Class Project Pxgt 6110
 
你的桶子有多滿
你的桶子有多滿你的桶子有多滿
你的桶子有多滿
 
Baker Wedding Slideshow Review
Baker Wedding Slideshow ReviewBaker Wedding Slideshow Review
Baker Wedding Slideshow Review
 
Even Start Flipbook
Even Start FlipbookEven Start Flipbook
Even Start Flipbook
 
Data Mining Protein Structures' Topological Properties to Enhance Contact Ma...
Data Mining Protein Structures' Topological Properties  to Enhance Contact Ma...Data Mining Protein Structures' Topological Properties  to Enhance Contact Ma...
Data Mining Protein Structures' Topological Properties to Enhance Contact Ma...
 
Lorelle at WordCamp 2008 - 260 Ways to Break WordPress
Lorelle at WordCamp 2008 - 260 Ways to Break WordPressLorelle at WordCamp 2008 - 260 Ways to Break WordPress
Lorelle at WordCamp 2008 - 260 Ways to Break WordPress
 
4 T
4  T4  T
4 T
 
6. open innov conclusions
6. open innov conclusions6. open innov conclusions
6. open innov conclusions
 
La3 Computer Network
La3 Computer NetworkLa3 Computer Network
La3 Computer Network
 
I M S Rubashkin
I M S RubashkinI M S Rubashkin
I M S Rubashkin
 
Johannes Lars
Johannes LarsJohannes Lars
Johannes Lars
 
Hide you file behind a picture
Hide you file behind a pictureHide you file behind a picture
Hide you file behind a picture
 

Mais de Selena Deckelmann

While we're here, let's fix computer science education
While we're here, let's fix computer science educationWhile we're here, let's fix computer science education
While we're here, let's fix computer science educationSelena Deckelmann
 
Mistakes were made - LCA 2012
Mistakes were made - LCA 2012Mistakes were made - LCA 2012
Mistakes were made - LCA 2012Selena Deckelmann
 
Postgres needs an aircraft carrier
Postgres needs an aircraft carrierPostgres needs an aircraft carrier
Postgres needs an aircraft carrierSelena Deckelmann
 
Harder, better, faster, stronger: PostgreSQL 9.1
Harder, better, faster, stronger: PostgreSQL 9.1Harder, better, faster, stronger: PostgreSQL 9.1
Harder, better, faster, stronger: PostgreSQL 9.1Selena Deckelmann
 
Letters from the open source trenches - Postgres community
Letters from the open source trenches - Postgres communityLetters from the open source trenches - Postgres community
Letters from the open source trenches - Postgres communitySelena Deckelmann
 
Own it: working with a changing open source community
Own it: working with a changing open source communityOwn it: working with a changing open source community
Own it: working with a changing open source communitySelena Deckelmann
 
Managing terabytes: When Postgres gets big
Managing terabytes: When Postgres gets bigManaging terabytes: When Postgres gets big
Managing terabytes: When Postgres gets bigSelena Deckelmann
 
Managing terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets bigManaging terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets bigSelena Deckelmann
 
How a bunch of normal people Used Technology To Repair a Rigged Election
How a bunch of normal people Used Technology To Repair a Rigged ElectionHow a bunch of normal people Used Technology To Repair a Rigged Election
How a bunch of normal people Used Technology To Repair a Rigged ElectionSelena Deckelmann
 
Open Source Bridge Opening Day
Open Source Bridge Opening DayOpen Source Bridge Opening Day
Open Source Bridge Opening DaySelena Deckelmann
 
What Assumptions Make: Filesystem I/O from a database perspective
What Assumptions Make: Filesystem I/O from a database perspectiveWhat Assumptions Make: Filesystem I/O from a database perspective
What Assumptions Make: Filesystem I/O from a database perspectiveSelena Deckelmann
 

Mais de Selena Deckelmann (20)

While we're here, let's fix computer science education
While we're here, let's fix computer science educationWhile we're here, let's fix computer science education
While we're here, let's fix computer science education
 
Hire the right way
Hire the right wayHire the right way
Hire the right way
 
Mistakes were made - LCA 2012
Mistakes were made - LCA 2012Mistakes were made - LCA 2012
Mistakes were made - LCA 2012
 
Pg92 HA, LCA 2012, Ballarat
Pg92 HA, LCA 2012, BallaratPg92 HA, LCA 2012, Ballarat
Pg92 HA, LCA 2012, Ballarat
 
Managing terabytes
Managing terabytesManaging terabytes
Managing terabytes
 
Mistakes were made
Mistakes were madeMistakes were made
Mistakes were made
 
Postgres needs an aircraft carrier
Postgres needs an aircraft carrierPostgres needs an aircraft carrier
Postgres needs an aircraft carrier
 
Mistakes were made
Mistakes were madeMistakes were made
Mistakes were made
 
Harder, better, faster, stronger: PostgreSQL 9.1
Harder, better, faster, stronger: PostgreSQL 9.1Harder, better, faster, stronger: PostgreSQL 9.1
Harder, better, faster, stronger: PostgreSQL 9.1
 
How to ask for money
How to ask for moneyHow to ask for money
How to ask for money
 
Letters from the open source trenches - Postgres community
Letters from the open source trenches - Postgres communityLetters from the open source trenches - Postgres community
Letters from the open source trenches - Postgres community
 
Own it: working with a changing open source community
Own it: working with a changing open source communityOwn it: working with a changing open source community
Own it: working with a changing open source community
 
Managing terabytes: When Postgres gets big
Managing terabytes: When Postgres gets bigManaging terabytes: When Postgres gets big
Managing terabytes: When Postgres gets big
 
Managing terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets bigManaging terabytes: When PostgreSQL gets big
Managing terabytes: When PostgreSQL gets big
 
Pdxpugday2010 pg90
Pdxpugday2010 pg90Pdxpugday2010 pg90
Pdxpugday2010 pg90
 
Illustrated buffer cache
Illustrated buffer cacheIllustrated buffer cache
Illustrated buffer cache
 
Bucardo
BucardoBucardo
Bucardo
 
How a bunch of normal people Used Technology To Repair a Rigged Election
How a bunch of normal people Used Technology To Repair a Rigged ElectionHow a bunch of normal people Used Technology To Repair a Rigged Election
How a bunch of normal people Used Technology To Repair a Rigged Election
 
Open Source Bridge Opening Day
Open Source Bridge Opening DayOpen Source Bridge Opening Day
Open Source Bridge Opening Day
 
What Assumptions Make: Filesystem I/O from a database perspective
What Assumptions Make: Filesystem I/O from a database perspectiveWhat Assumptions Make: Filesystem I/O from a database perspective
What Assumptions Make: Filesystem I/O from a database perspective
 

Último

Buy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy Verified Accounts
 
Innovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfInnovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfrichard876048
 
Financial-Statement-Analysis-of-Coca-cola-Company.pptx
Financial-Statement-Analysis-of-Coca-cola-Company.pptxFinancial-Statement-Analysis-of-Coca-cola-Company.pptx
Financial-Statement-Analysis-of-Coca-cola-Company.pptxsaniyaimamuddin
 
8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCRashishs7044
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdfKhaled Al Awadi
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCRashishs7044
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607dollysharma2066
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCRashishs7044
 
Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Peter Ward
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaoncallgirls2057
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Anamaria Contreras
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesKeppelCorporation
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfJos Voskuil
 
Organizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessOrganizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessSeta Wicaksana
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africaictsugar
 
Darshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfDarshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfShashank Mehta
 
Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Americas Got Grants
 

Último (20)

Buy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail AccountsBuy gmail accounts.pdf Buy Old Gmail Accounts
Buy gmail accounts.pdf Buy Old Gmail Accounts
 
Innovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfInnovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdf
 
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCREnjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
Enjoy ➥8448380779▻ Call Girls In Sector 18 Noida Escorts Delhi NCR
 
Financial-Statement-Analysis-of-Coca-cola-Company.pptx
Financial-Statement-Analysis-of-Coca-cola-Company.pptxFinancial-Statement-Analysis-of-Coca-cola-Company.pptx
Financial-Statement-Analysis-of-Coca-cola-Company.pptx
 
8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR8447779800, Low rate Call girls in Rohini Delhi NCR
8447779800, Low rate Call girls in Rohini Delhi NCR
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
 
Call Us ➥9319373153▻Call Girls In North Goa
Call Us ➥9319373153▻Call Girls In North GoaCall Us ➥9319373153▻Call Girls In North Goa
Call Us ➥9319373153▻Call Girls In North Goa
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
 
Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...Fordham -How effective decision-making is within the IT department - Analysis...
Fordham -How effective decision-making is within the IT department - Analysis...
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation Slides
 
Corporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information TechnologyCorporate Profile 47Billion Information Technology
Corporate Profile 47Billion Information Technology
 
Digital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdfDigital Transformation in the PLM domain - distrib.pdf
Digital Transformation in the PLM domain - distrib.pdf
 
Organizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessOrganizational Structure Running A Successful Business
Organizational Structure Running A Successful Business
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africa
 
Darshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdfDarshan Hiranandani [News About Next CEO].pdf
Darshan Hiranandani [News About Next CEO].pdf
 
Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...Church Building Grants To Assist With New Construction, Additions, And Restor...
Church Building Grants To Assist With New Construction, Additions, And Restor...
 

Algorithms are Recipes

  • 2. What is an algorithm?
  • 3. “A set of rules to be followed in problem solving operations.”
  • 5. Input Algorithm Output
  • 6. Input Algorithm Output “A set of rules to be followed in problem solving operations.”
  • 7. Input Algorithm Output • 2 slices bread “A set of rules to be • 1 tbsp peanut butter followed in problem • 2 tsp strawberry jam solving operations.”
  • 8. Input Algorithm Output • 2 slices bread “A set of rules to be • 1 tbsp peanut butter followed in problem • 2 tsp strawberry jam solving operations.”
  • 9. Input Algorithm Output • 2 slices bread • 1 tbsp peanut butter • 2 tsp strawberry jam
  • 10. Selena & Michelle’s PBJ algorithm How many steps do you think it will take?
  • 11. There’s more than one way to do it.
  • 12. """ (C) Gerold Penz) Python can be simple, too :-) """ for quant in range(99, 0, -1): if quant > 1: print quant, "bottles of beer on the wall,", quant, "bottles of beer." if quant > 2: suffix = str(quant - 1) + " bottles of beer on the wall." else: suffix = "1 bottle of beer on the wall." elif quant == 1: print "1 bottle of beer on the wall, 1 bottle of beer." suffix = "no more beer on the wall!" print "Take one down, pass it around,", suffix print "--"
  • 13. # (c) Barbara Shaurette def bottles(): for i in reversed(range(100)): if i > 0: b = "bottles" if i == 1: b = "bottle" print i, b, "of beer on the wall,", i, b, "of beer" print "Take one down, pass it around,", i-1, "bottles of beer on the wallnr" bottles()
  • 15. Example: Get from the airport to home.
  • 16. “The taxi algorithm” • Go to the taxi stand. • Get in a taxi. • Give the driver my address.
  • 17. “The call-me algorithm” • When your plane arrives, call my cell phone. • Meet me outside baggage claim.
  • 18. “The rent-a-car algorithm” • Take the shuttle to the rental car place. • Rent a car. • Follow the directions to get to my house.
  • 19. “The bus algorithm” • Outside baggage claim, catch bus number 70. • Transfer to bus 14 on Main Street. • Get off on Elm street. • Walk two blocks north to my house.
  • 20. All get you to where you need to go.

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n