SlideShare ist ein Scribd-Unternehmen logo
1 von 10
Downloaden Sie, um offline zu lesen
Is palindrome
   Comment and test out the following code
    until you COMPLETELY understand it.

   Do one slide at a time and try to figure it out
                  BY YOURSELF!
One long way:
A shorter
way:
An even
shorter way:
What does this line do?
 ‘python’[::-1]

 Knowing this, rewrite is_palindrome so that
 this function is only one line without using any
 of the previous definitions mentioned!
 This would make it the shortest way of writing
 this function.
Is palindrome
Adding Swampy


Step ONE:
 Download the swampy zipfile
from our course website

Step TWO:
Unzip it to somewhere easy to
access in your home (h:) drive

Step THREE :
Go to your desktop > right click
on ‘my computer’ > properties
> advanced tab > environment
variables > click ‘new’ under
user variables
Adding Swampy


Step FOUR:
Under variable name type
:PYTHON PATH

Under variable value type:
H: [AND THEN THE PATH YOU
SAVED IT TO]


Step FIVE:
Restart python.

Step SIX:

To check if you did it
correctly, in the Python Shell
type in:
From TurtleWorld import *

If that didn’t’give you an
error, you are good to go!
Is palindrome

Weitere ähnliche Inhalte

Andere mochten auch

Τι είναι η Ευρώπη_02
Τι είναι η Ευρώπη_02Τι είναι η Ευρώπη_02
Τι είναι η Ευρώπη_02Dimitri Kokkonis
 
Burofax remitido al director de ABC para la rectificación de la noticia publi...
Burofax remitido al director de ABC para la rectificación de la noticia publi...Burofax remitido al director de ABC para la rectificación de la noticia publi...
Burofax remitido al director de ABC para la rectificación de la noticia publi...UPyDMajadahonda
 
Mocadors amb puntes
Mocadors amb puntesMocadors amb puntes
Mocadors amb puntesestherjulio
 
Horror genre presentation
Horror genre presentationHorror genre presentation
Horror genre presentationjessiekeegan
 
IBM forms & advantages
IBM forms & advantagesIBM forms & advantages
IBM forms & advantageswwgreatmutha
 
Indian Horses Before Columbus Evidences in America
Indian Horses Before Columbus Evidences in AmericaIndian Horses Before Columbus Evidences in America
Indian Horses Before Columbus Evidences in AmericaRuben LLumihucci
 
Crowfunding - Principles & Technics
Crowfunding - Principles & Technics Crowfunding - Principles & Technics
Crowfunding - Principles & Technics ecobuild.brussels
 
How michael jackson's 'thriller' changed the music
How michael jackson's 'thriller' changed the musicHow michael jackson's 'thriller' changed the music
How michael jackson's 'thriller' changed the musicGabby Vicentè
 
Sap basis online training course
Sap basis online training courseSap basis online training course
Sap basis online training courseNewyorksys.com
 

Andere mochten auch (14)

Neraca anggaran
Neraca anggaranNeraca anggaran
Neraca anggaran
 
Anggaran kas 2
Anggaran kas 2Anggaran kas 2
Anggaran kas 2
 
Τι είναι η Ευρώπη_02
Τι είναι η Ευρώπη_02Τι είναι η Ευρώπη_02
Τι είναι η Ευρώπη_02
 
Dpa
DpaDpa
Dpa
 
Burofax remitido al director de ABC para la rectificación de la noticia publi...
Burofax remitido al director de ABC para la rectificación de la noticia publi...Burofax remitido al director de ABC para la rectificación de la noticia publi...
Burofax remitido al director de ABC para la rectificación de la noticia publi...
 
Mocadors amb puntes
Mocadors amb puntesMocadors amb puntes
Mocadors amb puntes
 
Horror genre presentation
Horror genre presentationHorror genre presentation
Horror genre presentation
 
IBM forms & advantages
IBM forms & advantagesIBM forms & advantages
IBM forms & advantages
 
Indian Horses Before Columbus Evidences in America
Indian Horses Before Columbus Evidences in AmericaIndian Horses Before Columbus Evidences in America
Indian Horses Before Columbus Evidences in America
 
Deselction
DeselctionDeselction
Deselction
 
prova competenze
prova competenzeprova competenze
prova competenze
 
Crowfunding - Principles & Technics
Crowfunding - Principles & Technics Crowfunding - Principles & Technics
Crowfunding - Principles & Technics
 
How michael jackson's 'thriller' changed the music
How michael jackson's 'thriller' changed the musicHow michael jackson's 'thriller' changed the music
How michael jackson's 'thriller' changed the music
 
Sap basis online training course
Sap basis online training courseSap basis online training course
Sap basis online training course
 

Ähnlich wie Is palindrome

Suji May12
Suji May12Suji May12
Suji May12ksujitha
 
Getting started with PHPUnit
Getting started with PHPUnitGetting started with PHPUnit
Getting started with PHPUnitKhyati Gala
 
Fabien Potencier "Symfony 4 in action"
Fabien Potencier "Symfony 4 in action"Fabien Potencier "Symfony 4 in action"
Fabien Potencier "Symfony 4 in action"Fwdays
 
exp-7-pig installation.pptx
exp-7-pig installation.pptxexp-7-pig installation.pptx
exp-7-pig installation.pptxvishal choudhary
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python courseEran Shlomo
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using SwiftDiego Freniche Brito
 
Behat - Drupal South 2018
Behat  - Drupal South 2018Behat  - Drupal South 2018
Behat - Drupal South 2018Berend de Boer
 
Installation of OpenBiblio on Windows XP using EasyPHP
Installation of OpenBiblio on Windows XP using EasyPHPInstallation of OpenBiblio on Windows XP using EasyPHP
Installation of OpenBiblio on Windows XP using EasyPHPRupesh Kumar
 
Quick start website manually installing word press pdf
Quick start website manually installing word press pdfQuick start website manually installing word press pdf
Quick start website manually installing word press pdfviet nghiem
 
Python setup for dummies
Python setup for dummiesPython setup for dummies
Python setup for dummiesRajesh Rajamani
 
vim brownbag - Richard forth
vim brownbag - Richard forthvim brownbag - Richard forth
vim brownbag - Richard forthEdwardElric59
 
Getting started with python.pdf
Getting started with python.pdfGetting started with python.pdf
Getting started with python.pdfAbhinavBawane
 
When Good Code Goes Bad: Tools and Techniques for Troubleshooting Plone
When Good Code Goes Bad: Tools and Techniques for Troubleshooting PloneWhen Good Code Goes Bad: Tools and Techniques for Troubleshooting Plone
When Good Code Goes Bad: Tools and Techniques for Troubleshooting PloneDavid Glick
 
Pythonlearn-01-Intro.pptx
Pythonlearn-01-Intro.pptxPythonlearn-01-Intro.pptx
Pythonlearn-01-Intro.pptxMrHackerxD
 
AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0CTruncer
 

Ähnlich wie Is palindrome (20)

Suji May12
Suji May12Suji May12
Suji May12
 
Getting started with PHPUnit
Getting started with PHPUnitGetting started with PHPUnit
Getting started with PHPUnit
 
Fabien Potencier "Symfony 4 in action"
Fabien Potencier "Symfony 4 in action"Fabien Potencier "Symfony 4 in action"
Fabien Potencier "Symfony 4 in action"
 
exp-7-pig installation.pptx
exp-7-pig installation.pptxexp-7-pig installation.pptx
exp-7-pig installation.pptx
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Behat - Drupal South 2018
Behat  - Drupal South 2018Behat  - Drupal South 2018
Behat - Drupal South 2018
 
Installation of OpenBiblio on Windows XP using EasyPHP
Installation of OpenBiblio on Windows XP using EasyPHPInstallation of OpenBiblio on Windows XP using EasyPHP
Installation of OpenBiblio on Windows XP using EasyPHP
 
Quick start website manually installing word press pdf
Quick start website manually installing word press pdfQuick start website manually installing word press pdf
Quick start website manually installing word press pdf
 
Python setup for dummies
Python setup for dummiesPython setup for dummies
Python setup for dummies
 
vim brownbag - Richard forth
vim brownbag - Richard forthvim brownbag - Richard forth
vim brownbag - Richard forth
 
First app
First appFirst app
First app
 
Authoring tool
Authoring tool Authoring tool
Authoring tool
 
REPL-driven development with pry
REPL-driven development with pry  REPL-driven development with pry
REPL-driven development with pry
 
Getting started with python.pdf
Getting started with python.pdfGetting started with python.pdf
Getting started with python.pdf
 
When Good Code Goes Bad: Tools and Techniques for Troubleshooting Plone
When Good Code Goes Bad: Tools and Techniques for Troubleshooting PloneWhen Good Code Goes Bad: Tools and Techniques for Troubleshooting Plone
When Good Code Goes Bad: Tools and Techniques for Troubleshooting Plone
 
Learning Python
Learning PythonLearning Python
Learning Python
 
Python Lecture 0
Python Lecture 0Python Lecture 0
Python Lecture 0
 
Pythonlearn-01-Intro.pptx
Pythonlearn-01-Intro.pptxPythonlearn-01-Intro.pptx
Pythonlearn-01-Intro.pptx
 
AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0AntiVirus Evasion Reconstructed - Veil 3.0
AntiVirus Evasion Reconstructed - Veil 3.0
 

Mehr von derekoei

Special Education at Etobicoke CI
Special Education at Etobicoke CISpecial Education at Etobicoke CI
Special Education at Etobicoke CIderekoei
 
Grade 8 Parent Night - 2013
Grade 8 Parent Night - 2013Grade 8 Parent Night - 2013
Grade 8 Parent Night - 2013derekoei
 
Grade 8 Parent Night - 2013
Grade 8 Parent Night - 2013Grade 8 Parent Night - 2013
Grade 8 Parent Night - 2013derekoei
 
Operating systems
Operating systemsOperating systems
Operating systemsderekoei
 
Html text formatting
Html text formattingHtml text formatting
Html text formattingderekoei
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer sciencederekoei
 

Mehr von derekoei (6)

Special Education at Etobicoke CI
Special Education at Etobicoke CISpecial Education at Etobicoke CI
Special Education at Etobicoke CI
 
Grade 8 Parent Night - 2013
Grade 8 Parent Night - 2013Grade 8 Parent Night - 2013
Grade 8 Parent Night - 2013
 
Grade 8 Parent Night - 2013
Grade 8 Parent Night - 2013Grade 8 Parent Night - 2013
Grade 8 Parent Night - 2013
 
Operating systems
Operating systemsOperating systems
Operating systems
 
Html text formatting
Html text formattingHtml text formatting
Html text formatting
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
 

Kürzlich hochgeladen

2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptxSandy Millin
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17Celine George
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfMohonDas
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...CaraSkikne1
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxKatherine Villaluna
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17Celine George
 
Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationMJDuyan
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfMohonDas
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17Celine George
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17Celine George
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxMYDA ANGELICA SUAN
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...Nguyen Thanh Tu Collection
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.EnglishCEIPdeSigeiro
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...raviapr7
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxKatherine Villaluna
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 

Kürzlich hochgeladen (20)

2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
 
Prelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quizPrelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quiz
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdf
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...
 
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptxPractical Research 1: Lesson 8 Writing the Thesis Statement.pptx
Practical Research 1: Lesson 8 Writing the Thesis Statement.pptx
 
How to Solve Singleton Error in the Odoo 17
How to Solve Singleton Error in the  Odoo 17How to Solve Singleton Error in the  Odoo 17
How to Solve Singleton Error in the Odoo 17
 
Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive Education
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdf
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptx
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptx
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 

Is palindrome

  • 2. Comment and test out the following code until you COMPLETELY understand it.  Do one slide at a time and try to figure it out BY YOURSELF!
  • 6. What does this line do? ‘python’[::-1] Knowing this, rewrite is_palindrome so that this function is only one line without using any of the previous definitions mentioned! This would make it the shortest way of writing this function.
  • 8. Adding Swampy Step ONE: Download the swampy zipfile from our course website Step TWO: Unzip it to somewhere easy to access in your home (h:) drive Step THREE : Go to your desktop > right click on ‘my computer’ > properties > advanced tab > environment variables > click ‘new’ under user variables
  • 9. Adding Swampy Step FOUR: Under variable name type :PYTHON PATH Under variable value type: H: [AND THEN THE PATH YOU SAVED IT TO] Step FIVE: Restart python. Step SIX: To check if you did it correctly, in the Python Shell type in: From TurtleWorld import * If that didn’t’give you an error, you are good to go!