iamnoob wrote:Vote to sticky if baseball commits to working on this![]()
How Do I run the things I type in? I tried run but I can't find the script, and it won't let me save it. ;(
Ill look at the best to show how one sec
iamnoob wrote:Vote to sticky if baseball commits to working on this![]()
How Do I run the things I type in? I tried run but I can't find the script, and it won't let me save it. ;(
iamnoob wrote:Vote to sticky if baseball commits to working on this![]()
How Do I run the things I type in? I tried run but I can't find the script, and it won't let me save it. ;(
iamnoob wrote:Whats the exact download you got baseball, because mine isn't working properly.
Code: Select all
#---------------------------------------------------------------#
# #
# pizza.py #
# ePizza making program #
# functions definition example. #
# #
# In this module we build a virtual pizza making #
# machine using various functions. It shows how an #
# argument is passed to a function. You can see #
# functions like little parts of a bigger, more complex #
# machine. When the machine wants to do something, it #
# "calls" one of it's little part, one of it's function, #
# to execute the task. #
#---------------------------------------------------------------#
# We first
# need to define some pizza making functions if we want to
# use them later.
#
# These are simple functions that simply manage
# display operations:
# the sauce adder, it receives the sauceType argument
def addSauce(sauceType):
print "We first add " + sauceType + " sauce"
# Just like the previous function, the followings receive an argument
# but note that a function does not need to receive any arguments at all.
# It's good practice to give explicit names to your functions so people easily
# understand what they do:
def addMeat(meatType):
print "We then add some " + meatType
def addVeggies(veggieType):
print "Now with some veggies, why not some " + veggieType
def addCheese(cheeseType):
print "Finally we put some " + cheeseType + " cheese!"
# We're done with the functions.
# Under is the pizza making program core, it is like a list
# of the things that should happen in the order they should
# happen.
print "We are making some pizza!\n" #the \n character jumps to a new line
addSauce("bbq") #we add some bbq sauce, sent to the function as an argument
addMeat("chicken") #We add meat,
addVeggies("hot peppers") #we add some mushrooms and peppers
addCheese("mozarella") #Finally we add cheese!
print "\nBake that! It's gonna make some nice pizza!" #Pizza is ready!
Return to “FOF Mod Discussion and Support”
Users browsing this forum: No registered users and 11 guests