Changes

Jump to: navigation, search

OPS435 Python Lab 3

44 bytes removed, 14:50, 30 May 2017
PART 1 - Using Functions
: When a program is run, the '''function's code is read into internal memory''', ready to be run when the function is '''run''' (i.e. '''function is "called"'''). By '''calling the function''' the function is run automatically.
:When creating programs that define and use functions, '''a large programming task can be broken-down into smaller elements''' (or '''modules'''). This is why creating programs that use functions is referred to as '''"modular programming"'''.
:In our situation, a Python '''function''' is a Functions may accept '''predefined set of code''', this code is loaded into python (eg. internal memory), but it does not immediately perform any actions. Functions may accept arguments and/or return values''', or not '''accept arguments and/or return values'''. Until a Function is specifically told to execute, it's code will sit (in internal memory) unused.
== PART 1 - Using Functions ==
'''Functions and Strings'''
 
: You will now learn how to define and run functions that will pass up strings (as arguments) when a function is called.
 
:'''Perform the Following Steps:'''
:#To start, open ipython and try experimenting with functions.<source>
13,420
edits

Navigation menu