def fancyprint(string, n): # string and n are parameters of fancyprint. """Takes a string input and a number and prints the string fancily \ that number of times.""" tempstring = string.upper().replace("O","0") print tempstring * n print "\nJust so you remember, the value of inputstr is " \ + inputstr + "." def main(): # This makes it so that inputstr is visible everywhere, not just in # the main() function. global inputstr inputstr = raw_input("\nGive me a string to print fancily 4 times: \n") fancyprint(inputstr, 4) # Passes inputstr to the fancyprint function. # Here inputstr is an argument to fancyprint. # This doesn't make sense: # print "The value of tempstring is " + tempstring + "." raw_input("\nHit enter to exit.\n") # This is the call that actually makes the program run. main()