Download presentation
Presentation is loading. Please wait.
Published byBrycen Higgason Modified over 10 years ago
1
Procedures and Functions
2
What are they? They are both blocks of code that can be reused to perform specific task. However there is a difference: Function- The word comes from mathematics. It calculates a value based on inputs. E.g. Input X Function= Multiply by 2 Output= 2X Procedure- A set of commands that can be executed in a certain order. They do not return values. E.g. run Function1 then run Function2
3
Languages can help you out Programming languages often contain built in function. These are often complex action that would otherwise take a lot of time to create by yourself. They save time and make it much simpler to code E.g. Python- input(), len(),.upper()
4
You also need to know about Parameters and Return Values Parameter- information given to a function or procedure (a numerical or other measurable factor forming one of a set that defines a system or sets the conditions of its operation) E.g. Python Return Values – Information that come out of a subroutine. Look it even says return.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.