Page 238 - Beginning Programming with Pyth - John Paul Mueller
P. 238
print("Hello ", Name)
return
def SayGoodbye(Name):
print("Goodbye ", Name)
return
You may need to copy the resulting file to your existing BPPD folder, depending on where your browser normally downloads files. When done correctly, your Notebook dashboard should contain a copy of the file, as shown in Figure 11-1. Using the Notebook's Import feature, described in the “Importing a notebook” section of Chapter 4, makes things considerably easier.
FIGURE 11-1: Make sure you place a copy of the package in your BPPD folder.
The example code contains two simple functions named SayHello() and SayGoodbye(). In both cases, you supply a Name to print and the function prints it onscreen along with a greeting for you. At that point, the function returns control to the caller. Obviously, you normally create