SlideShare a Scribd company logo
Intro to Functions
Think About It!?!?
 Create an algorithm for the following
situation
 Make a jeroo turn around
What is a Function?
 Functions
 Well Defined Single Tasks
 Easier to read code
 Separate Your program
 Reuse sections of code
 Name them using camelCase
 Give good names like variables
Example
 Task: Have the jeroo hop five miles (eight
blocks = 1 mile).
 Old way:
Silver.hop()
Silver.hop()
Silver.hop()
Silver.hop()
Silver.hop()
Silver.hop()
Silver.hop()
Silver.hop()
Silver.hop()
Silver.hop() etc (should have 40 instructions)
Example
 Better way:
 Define a moveMile instruction as eight move
instructions.
 Then call moveMile 5 times.
 Both programs move the jeroo the same distance,
but the second program will be much easier to read
and understand.
 In complicated programs, the ability to extend a
jeroo’s vocabulary makes the difference between
understandable programs and unintelligible ones.
Defining New Functions
def functionName(self ):
<list-of-instructions>
 The function name should specify what the method
is intended to do.
 The list of instructions should accomplish what its
name implies.
 Each function should perform only a single task
This is a
“block”
of code
Defining a MileWalker Jeroo
def moveMile(self):
self.hop()
self.hop()
self.hop()
self.hop()
self.hop()
self.hop()
self.hop()
self.hop() Program in
the general
Exercise
 Create a mileWalker in your intro exercise
 Notice how your main is beginning to
resemble an algorithm and all the tedious
code is hiding in methods
 Question: Where is a list of all the
predefined functions in Jeroo?
Ad

More Related Content

What's hot (20)

Programming in Python
Programming in Python Programming in Python
Programming in Python
Tiji Thomas
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Edureka!
 
Python basics
Python basicsPython basics
Python basics
Hoang Nguyen
 
Introduction to the basics of Python programming (part 3)
Introduction to the basics of Python programming (part 3)Introduction to the basics of Python programming (part 3)
Introduction to the basics of Python programming (part 3)
Pedro Rodrigues
 
Python : Functions
Python : FunctionsPython : Functions
Python : Functions
Emertxe Information Technologies Pvt Ltd
 
Python Interview Questions And Answers
Python Interview Questions And AnswersPython Interview Questions And Answers
Python Interview Questions And Answers
H2Kinfosys
 
Learn Python The Hard Way Presentation
Learn Python The Hard Way PresentationLearn Python The Hard Way Presentation
Learn Python The Hard Way Presentation
Amira ElSharkawy
 
FUNDAMENTALS OF PYTHON LANGUAGE
 FUNDAMENTALS OF PYTHON LANGUAGE  FUNDAMENTALS OF PYTHON LANGUAGE
FUNDAMENTALS OF PYTHON LANGUAGE
Saraswathi Murugan
 
Advance python
Advance pythonAdvance python
Advance python
pulkit agrawal
 
Pythonpresent
PythonpresentPythonpresent
Pythonpresent
Chui-Wen Chiu
 
Let’s Learn Python An introduction to Python
Let’s Learn Python An introduction to Python Let’s Learn Python An introduction to Python
Let’s Learn Python An introduction to Python
Jaganadh Gopinadhan
 
Day2
Day2Day2
Day2
Karin Lagesen
 
Python course Day 1
Python course Day 1Python course Day 1
Python course Day 1
Karin Lagesen
 
Python and You Series
Python and You SeriesPython and You Series
Python and You Series
Karthik Prakash
 
Programming with Python
Programming with PythonProgramming with Python
Programming with Python
Rasan Samarasinghe
 
Day3
Day3Day3
Day3
Karin Lagesen
 
Fundamentals of Python Programming
Fundamentals of Python ProgrammingFundamentals of Python Programming
Fundamentals of Python Programming
Kamal Acharya
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
RojaPriya
 
Python
PythonPython
Python
Gagandeep Nanda
 
python Function
python Function python Function
python Function
Ronak Rathi
 
Programming in Python
Programming in Python Programming in Python
Programming in Python
Tiji Thomas
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Edureka!
 
Introduction to the basics of Python programming (part 3)
Introduction to the basics of Python programming (part 3)Introduction to the basics of Python programming (part 3)
Introduction to the basics of Python programming (part 3)
Pedro Rodrigues
 
Python Interview Questions And Answers
Python Interview Questions And AnswersPython Interview Questions And Answers
Python Interview Questions And Answers
H2Kinfosys
 
Learn Python The Hard Way Presentation
Learn Python The Hard Way PresentationLearn Python The Hard Way Presentation
Learn Python The Hard Way Presentation
Amira ElSharkawy
 
FUNDAMENTALS OF PYTHON LANGUAGE
 FUNDAMENTALS OF PYTHON LANGUAGE  FUNDAMENTALS OF PYTHON LANGUAGE
FUNDAMENTALS OF PYTHON LANGUAGE
Saraswathi Murugan
 
Let’s Learn Python An introduction to Python
Let’s Learn Python An introduction to Python Let’s Learn Python An introduction to Python
Let’s Learn Python An introduction to Python
Jaganadh Gopinadhan
 
Fundamentals of Python Programming
Fundamentals of Python ProgrammingFundamentals of Python Programming
Fundamentals of Python Programming
Kamal Acharya
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
RojaPriya
 
python Function
python Function python Function
python Function
Ronak Rathi
 

Similar to Intro to Functions Python (20)

Clojure and The Robot Apocalypse
Clojure and The Robot ApocalypseClojure and The Robot Apocalypse
Clojure and The Robot Apocalypse
elliando dias
 
Algorithm and Programming
Algorithm and ProgrammingAlgorithm and Programming
Algorithm and Programming
Nidal Abusaleh
 
PARADIGM IT.pptx
PARADIGM IT.pptxPARADIGM IT.pptx
PARADIGM IT.pptx
jamesmarken1
 
An Introduction to C# and .NET Framework (Basic)
An Introduction to C# and .NET Framework (Basic)An Introduction to C# and .NET Framework (Basic)
An Introduction to C# and .NET Framework (Basic)
Khubaib Ahmad Kunjahi
 
Erlang, an overview
Erlang, an overviewErlang, an overview
Erlang, an overview
Patrick Huesler
 
CLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptxCLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptx
JEEVANANTHAMG6
 
Natural language processing open seminar For Tensorflow usage
Natural language processing open seminar For Tensorflow usageNatural language processing open seminar For Tensorflow usage
Natural language processing open seminar For Tensorflow usage
hyunyoung Lee
 
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-IssueCodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
Dhaval Dalal
 
What`s New in Java 8
What`s New in Java 8What`s New in Java 8
What`s New in Java 8
Mohsen Zainalpour
 
Functional Programming In Jdk8
Functional Programming In Jdk8 Functional Programming In Jdk8
Functional Programming In Jdk8
Bansilal Haudakari
 
Notes5
Notes5Notes5
Notes5
hccit
 
Java 8-revealed
Java 8-revealedJava 8-revealed
Java 8-revealed
Hamed Hatami
 
F# 101
F# 101F# 101
F# 101
Chris Alcock
 
Clojure beasts-euroclj-2014
Clojure beasts-euroclj-2014Clojure beasts-euroclj-2014
Clojure beasts-euroclj-2014
Renzo Borgatti
 
OOPS Object oriented Programming PPT Tutorial
OOPS Object oriented Programming PPT TutorialOOPS Object oriented Programming PPT Tutorial
OOPS Object oriented Programming PPT Tutorial
amitnitpatna
 
Lambda Expressions in Java 8
Lambda Expressions in Java 8Lambda Expressions in Java 8
Lambda Expressions in Java 8
icarter09
 
Lab4 scripts
Lab4 scriptsLab4 scripts
Lab4 scripts
quantumleaf
 
Shell Scripting crash course.pdf
Shell Scripting crash course.pdfShell Scripting crash course.pdf
Shell Scripting crash course.pdf
harikrishnapolaki
 
Shell scripting
Shell scriptingShell scripting
Shell scripting
Mufaddal Haidermota
 
Logo tutorial
Logo tutorialLogo tutorial
Logo tutorial
Singajogi Sudhakar
 
Clojure and The Robot Apocalypse
Clojure and The Robot ApocalypseClojure and The Robot Apocalypse
Clojure and The Robot Apocalypse
elliando dias
 
Algorithm and Programming
Algorithm and ProgrammingAlgorithm and Programming
Algorithm and Programming
Nidal Abusaleh
 
An Introduction to C# and .NET Framework (Basic)
An Introduction to C# and .NET Framework (Basic)An Introduction to C# and .NET Framework (Basic)
An Introduction to C# and .NET Framework (Basic)
Khubaib Ahmad Kunjahi
 
CLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptxCLEAN CODING AND DEVOPS Final.pptx
CLEAN CODING AND DEVOPS Final.pptx
JEEVANANTHAMG6
 
Natural language processing open seminar For Tensorflow usage
Natural language processing open seminar For Tensorflow usageNatural language processing open seminar For Tensorflow usage
Natural language processing open seminar For Tensorflow usage
hyunyoung Lee
 
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-IssueCodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
Dhaval Dalal
 
Functional Programming In Jdk8
Functional Programming In Jdk8 Functional Programming In Jdk8
Functional Programming In Jdk8
Bansilal Haudakari
 
Notes5
Notes5Notes5
Notes5
hccit
 
Clojure beasts-euroclj-2014
Clojure beasts-euroclj-2014Clojure beasts-euroclj-2014
Clojure beasts-euroclj-2014
Renzo Borgatti
 
OOPS Object oriented Programming PPT Tutorial
OOPS Object oriented Programming PPT TutorialOOPS Object oriented Programming PPT Tutorial
OOPS Object oriented Programming PPT Tutorial
amitnitpatna
 
Lambda Expressions in Java 8
Lambda Expressions in Java 8Lambda Expressions in Java 8
Lambda Expressions in Java 8
icarter09
 
Shell Scripting crash course.pdf
Shell Scripting crash course.pdfShell Scripting crash course.pdf
Shell Scripting crash course.pdf
harikrishnapolaki
 
Ad

More from primeteacher32 (20)

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
 
Intro to Python with GPIO
Intro to Python with GPIOIntro to Python with GPIO
Intro to Python with GPIO
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
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
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
 
Ad

Recently uploaded (20)

Expository data analysis aand visualization-1.pdf
Expository data analysis aand visualization-1.pdfExpository data analysis aand visualization-1.pdf
Expository data analysis aand visualization-1.pdf
PrinceUzair4
 
Busiensns plan 34678973783738s FPPT.pptx
Busiensns plan 34678973783738s FPPT.pptxBusiensns plan 34678973783738s FPPT.pptx
Busiensns plan 34678973783738s FPPT.pptx
AzkaRao2
 
central nervous system brain nose mourth spinal vord
central nervous system brain nose mourth spinal vordcentral nervous system brain nose mourth spinal vord
central nervous system brain nose mourth spinal vord
MouryaGarg1
 
Mac repertory.pdfgghjjmgggggggggggggglkjhk
Mac repertory.pdfgghjjmgggggggggggggglkjhkMac repertory.pdfgghjjmgggggggggggggglkjhk
Mac repertory.pdfgghjjmgggggggggggggglkjhk
vasajagadishwar1
 
最新版加拿大特伦特大学毕业证(Trent毕业证书)原版定制
最新版加拿大特伦特大学毕业证(Trent毕业证书)原版定制最新版加拿大特伦特大学毕业证(Trent毕业证书)原版定制
最新版加拿大特伦特大学毕业证(Trent毕业证书)原版定制
Taqyea
 
Coronary artery disease resident final.pptx
Coronary artery disease resident final.pptxCoronary artery disease resident final.pptx
Coronary artery disease resident final.pptx
PrashantMohanty2
 
weather and climate for social studies level 4
weather and climate for social studies level 4weather and climate for social studies level 4
weather and climate for social studies level 4
kmchou1017
 
1Z0-771 - Oracle APEX Cloud Developer Professional (DUMPS).pdf
1Z0-771 - Oracle APEX Cloud Developer Professional (DUMPS).pdf1Z0-771 - Oracle APEX Cloud Developer Professional (DUMPS).pdf
1Z0-771 - Oracle APEX Cloud Developer Professional (DUMPS).pdf
govindbell
 
Web Developer Jobs in Jaipur for Freshers – Your Career Starts Here..pptx
Web Developer Jobs in Jaipur for Freshers – Your Career Starts Here..pptxWeb Developer Jobs in Jaipur for Freshers – Your Career Starts Here..pptx
Web Developer Jobs in Jaipur for Freshers – Your Career Starts Here..pptx
vinay salarite
 
how-to-future-proof-your-career-in-the-age-of-ai.pptx
how-to-future-proof-your-career-in-the-age-of-ai.pptxhow-to-future-proof-your-career-in-the-age-of-ai.pptx
how-to-future-proof-your-career-in-the-age-of-ai.pptx
StrengthsTheatre
 
Team Introduction slide for planing.pptx
Team Introduction slide for planing.pptxTeam Introduction slide for planing.pptx
Team Introduction slide for planing.pptx
maryanazir22
 
Human Behavior in an OrganizatioN POWER AND POLITICS
Human Behavior in an OrganizatioN POWER AND POLITICSHuman Behavior in an OrganizatioN POWER AND POLITICS
Human Behavior in an OrganizatioN POWER AND POLITICS
monaliz4mirandaa
 
Welder skill development course and .pptx
Welder skill development course and .pptxWelder skill development course and .pptx
Welder skill development course and .pptx
satishkumar511772
 
LBE Presentation on Business Communication
LBE Presentation on Business CommunicationLBE Presentation on Business Communication
LBE Presentation on Business Communication
komal691665
 
REAL ILLUMINATI UGANDA CALL WhatsApp number0782561496/0756664682
REAL ILLUMINATI UGANDA CALL WhatsApp number0782561496/0756664682REAL ILLUMINATI UGANDA CALL WhatsApp number0782561496/0756664682
REAL ILLUMINATI UGANDA CALL WhatsApp number0782561496/0756664682
way to join real illuminati Agent In Kampala Call/WhatsApp+256782561496/0756664682
 
NTS - Boost Your Job Search by Volunteering
NTS - Boost Your Job Search by VolunteeringNTS - Boost Your Job Search by Volunteering
NTS - Boost Your Job Search by Volunteering
Bruce Bennett
 
Report of Manish Malhotra and shamim ahmed .pptx
Report of Manish Malhotra and shamim ahmed .pptxReport of Manish Malhotra and shamim ahmed .pptx
Report of Manish Malhotra and shamim ahmed .pptx
AmitMalik746546
 
Power BI Jobs in Jaipur – Top Career Options in Data Analytics.pdf
Power BI Jobs in Jaipur – Top Career Options in Data Analytics.pdfPower BI Jobs in Jaipur – Top Career Options in Data Analytics.pdf
Power BI Jobs in Jaipur – Top Career Options in Data Analytics.pdf
vinay salarite
 
Interview questions for freshers by Talent Titan.pdf
Interview questions for freshers by Talent Titan.pdfInterview questions for freshers by Talent Titan.pdf
Interview questions for freshers by Talent Titan.pdf
shubhamgoel346498
 
Social Entrepreneurship (1) powerpoint.pptx
Social Entrepreneurship (1) powerpoint.pptxSocial Entrepreneurship (1) powerpoint.pptx
Social Entrepreneurship (1) powerpoint.pptx
kumaresan61999
 
Expository data analysis aand visualization-1.pdf
Expository data analysis aand visualization-1.pdfExpository data analysis aand visualization-1.pdf
Expository data analysis aand visualization-1.pdf
PrinceUzair4
 
Busiensns plan 34678973783738s FPPT.pptx
Busiensns plan 34678973783738s FPPT.pptxBusiensns plan 34678973783738s FPPT.pptx
Busiensns plan 34678973783738s FPPT.pptx
AzkaRao2
 
central nervous system brain nose mourth spinal vord
central nervous system brain nose mourth spinal vordcentral nervous system brain nose mourth spinal vord
central nervous system brain nose mourth spinal vord
MouryaGarg1
 
Mac repertory.pdfgghjjmgggggggggggggglkjhk
Mac repertory.pdfgghjjmgggggggggggggglkjhkMac repertory.pdfgghjjmgggggggggggggglkjhk
Mac repertory.pdfgghjjmgggggggggggggglkjhk
vasajagadishwar1
 
最新版加拿大特伦特大学毕业证(Trent毕业证书)原版定制
最新版加拿大特伦特大学毕业证(Trent毕业证书)原版定制最新版加拿大特伦特大学毕业证(Trent毕业证书)原版定制
最新版加拿大特伦特大学毕业证(Trent毕业证书)原版定制
Taqyea
 
Coronary artery disease resident final.pptx
Coronary artery disease resident final.pptxCoronary artery disease resident final.pptx
Coronary artery disease resident final.pptx
PrashantMohanty2
 
weather and climate for social studies level 4
weather and climate for social studies level 4weather and climate for social studies level 4
weather and climate for social studies level 4
kmchou1017
 
1Z0-771 - Oracle APEX Cloud Developer Professional (DUMPS).pdf
1Z0-771 - Oracle APEX Cloud Developer Professional (DUMPS).pdf1Z0-771 - Oracle APEX Cloud Developer Professional (DUMPS).pdf
1Z0-771 - Oracle APEX Cloud Developer Professional (DUMPS).pdf
govindbell
 
Web Developer Jobs in Jaipur for Freshers – Your Career Starts Here..pptx
Web Developer Jobs in Jaipur for Freshers – Your Career Starts Here..pptxWeb Developer Jobs in Jaipur for Freshers – Your Career Starts Here..pptx
Web Developer Jobs in Jaipur for Freshers – Your Career Starts Here..pptx
vinay salarite
 
how-to-future-proof-your-career-in-the-age-of-ai.pptx
how-to-future-proof-your-career-in-the-age-of-ai.pptxhow-to-future-proof-your-career-in-the-age-of-ai.pptx
how-to-future-proof-your-career-in-the-age-of-ai.pptx
StrengthsTheatre
 
Team Introduction slide for planing.pptx
Team Introduction slide for planing.pptxTeam Introduction slide for planing.pptx
Team Introduction slide for planing.pptx
maryanazir22
 
Human Behavior in an OrganizatioN POWER AND POLITICS
Human Behavior in an OrganizatioN POWER AND POLITICSHuman Behavior in an OrganizatioN POWER AND POLITICS
Human Behavior in an OrganizatioN POWER AND POLITICS
monaliz4mirandaa
 
Welder skill development course and .pptx
Welder skill development course and .pptxWelder skill development course and .pptx
Welder skill development course and .pptx
satishkumar511772
 
LBE Presentation on Business Communication
LBE Presentation on Business CommunicationLBE Presentation on Business Communication
LBE Presentation on Business Communication
komal691665
 
NTS - Boost Your Job Search by Volunteering
NTS - Boost Your Job Search by VolunteeringNTS - Boost Your Job Search by Volunteering
NTS - Boost Your Job Search by Volunteering
Bruce Bennett
 
Report of Manish Malhotra and shamim ahmed .pptx
Report of Manish Malhotra and shamim ahmed .pptxReport of Manish Malhotra and shamim ahmed .pptx
Report of Manish Malhotra and shamim ahmed .pptx
AmitMalik746546
 
Power BI Jobs in Jaipur – Top Career Options in Data Analytics.pdf
Power BI Jobs in Jaipur – Top Career Options in Data Analytics.pdfPower BI Jobs in Jaipur – Top Career Options in Data Analytics.pdf
Power BI Jobs in Jaipur – Top Career Options in Data Analytics.pdf
vinay salarite
 
Interview questions for freshers by Talent Titan.pdf
Interview questions for freshers by Talent Titan.pdfInterview questions for freshers by Talent Titan.pdf
Interview questions for freshers by Talent Titan.pdf
shubhamgoel346498
 
Social Entrepreneurship (1) powerpoint.pptx
Social Entrepreneurship (1) powerpoint.pptxSocial Entrepreneurship (1) powerpoint.pptx
Social Entrepreneurship (1) powerpoint.pptx
kumaresan61999
 

Intro to Functions Python

  • 2. Think About It!?!?  Create an algorithm for the following situation  Make a jeroo turn around
  • 3. What is a Function?  Functions  Well Defined Single Tasks  Easier to read code  Separate Your program  Reuse sections of code  Name them using camelCase  Give good names like variables
  • 4. Example  Task: Have the jeroo hop five miles (eight blocks = 1 mile).  Old way: Silver.hop() Silver.hop() Silver.hop() Silver.hop() Silver.hop() Silver.hop() Silver.hop() Silver.hop() Silver.hop() Silver.hop() etc (should have 40 instructions)
  • 5. Example  Better way:  Define a moveMile instruction as eight move instructions.  Then call moveMile 5 times.  Both programs move the jeroo the same distance, but the second program will be much easier to read and understand.  In complicated programs, the ability to extend a jeroo’s vocabulary makes the difference between understandable programs and unintelligible ones.
  • 6. Defining New Functions def functionName(self ): <list-of-instructions>  The function name should specify what the method is intended to do.  The list of instructions should accomplish what its name implies.  Each function should perform only a single task This is a “block” of code
  • 7. Defining a MileWalker Jeroo def moveMile(self): self.hop() self.hop() self.hop() self.hop() self.hop() self.hop() self.hop() self.hop() Program in the general
  • 8. Exercise  Create a mileWalker in your intro exercise  Notice how your main is beginning to resemble an algorithm and all the tedious code is hiding in methods  Question: Where is a list of all the predefined functions in Jeroo?
  翻译: