Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 3

80 bytes added, 08:12, 31 May 2017
PART 1 - Using Functions
print('Hello World')
print('Inside a Function')
</source>Remember to press '''ENTER''' a second time to return to the ipython prompt. You should notice may have notices that nothing happened. Well actually, something did happen... the function called '''hello(''') has been defined and stored in internal memory in order for it to run when called by its function name. Now that our function was created, we can use it over and over. <br><br>
:#To execute the code inside the function, run the function name with "'''()'''" '''brackets''' at the end of the function name.<br>Try running the '''hello()''' function by name three times by issuing the following in the ipython3 shell:<source>
hello()
13,420
edits