Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 1.2.1 >>> ================================ RESTART ================================ >>> >>> >>> ================================ RESTART ================================ >>> Hello from inside testfn! Hit enter to exit. >>> import fnsample Hello from inside testfn! Hit enter to exit. >>> testfn() Hello from inside testfn! >>> ================================ RESTART ================================ >>> Give me a string to print fancily: Welcome to Applebee's! WELC0ME T0 APPLEBEE'S! Hit enter to exit. >>> ================================ RESTART ================================ >>> Give me a string to print fancily: Hi! Traceback (most recent call last): File "C:/Documents and Settings/bwalter.AC_COMPUTING/Desktop/CF W08/python programs/fnsample.py", line 19, in main() File "C:/Documents and Settings/bwalter.AC_COMPUTING/Desktop/CF W08/python programs/fnsample.py", line 13, in main fancyprint(inputstr) # Passes inputstr to the fancyprint function. TypeError: fancyprint() takes exactly 2 arguments (1 given) >>> ================================ RESTART ================================ >>> import fnsample Give me a string to print fancily 4 times: Hi! HI!HI!HI!HI! Hit enter to exit. >>> 3+2 5 >>> num = 3+2 >>> print num 5 >>> ================================ RESTART ================================ >>> Let me find a Fibonacci number for you. Which one would you like? Enter a whole number. 5 The 5th Fibonacci number is 5. >>> ================================ RESTART ================================ >>> Let me find a Fibonacci number for you. Which one would you like? Enter a whole number. 10 The 10th Fibonacci number is 55. >>> import fib Let me find a Fibonacci number for you. Which one would you like? Enter a whole number. 6 The 6th Fibonacci number is 8. >>> fib(3) Traceback (most recent call last): File "", line 1, in fib(3) TypeError: 'module' object is not callable >>> fib.fib(4) 3 >>> ================================ RESTART ================================ >>> Let me find a Fibonacci number for you. Which one would you like? Enter a whole number. 6 The 6th Fibonacci number is 8. >>> import fibs Let me find a Fibonacci number for you. Which one would you like? Enter a whole number. 7 The 7th Fibonacci number is 13. >>> fib(8) 21 >>> ================================ RESTART ================================ >>> Let me find a Fibonacci number for you. Which one would you like? Enter a whole number. -8 The -8th Fibonacci number is Error!. >>> ================================ RESTART ================================ >>> Let me find a Fibonacci number for you. Which one would you like? Enter a whole number. 35 The 35th Fibonacci number is 9227465. >>> ================================ RESTART ================================ >>> Let me find a Fibonacci number for you. Which one would you like? Enter a whole number. 36 The 36th Fibonacci number is 14930352. >>> ================================ RESTART ================================ >>> Give me a string to print fancily 4 times: Whoa. WH0A.WH0A.WH0A.WH0A. Traceback (most recent call last): File "C:/Documents and Settings/bwalter.AC_COMPUTING/Desktop/CF W08/python programs/fnsample.py", line 22, in main() File "C:/Documents and Settings/bwalter.AC_COMPUTING/Desktop/CF W08/python programs/fnsample.py", line 17, in main print "The value of tempstring is " + tempstring + "." NameError: global name 'tempstring' is not defined >>> ================================ RESTART ================================ >>> Give me a string to print fancily 4 times: Yo, sup. Y0, SUP. Y0, SUP. Y0, SUP. Y0, SUP. Traceback (most recent call last): File "C:/Documents and Settings/bwalter.AC_COMPUTING/Desktop/CF W08/python programs/fnsample.py", line 25, in main() File "C:/Documents and Settings/bwalter.AC_COMPUTING/Desktop/CF W08/python programs/fnsample.py", line 16, in main fancyprint(inputstr, 4) # Passes inputstr to the fancyprint function. File "C:/Documents and Settings/bwalter.AC_COMPUTING/Desktop/CF W08/python programs/fnsample.py", line 10, in fancyprint + inputstr + "." NameError: global name 'inputstr' is not defined >>> ================================ RESTART ================================ >>> Give me a string to print fancily 4 times: Yo Y0 Y0 Y0 Y0 Just so you remember, the value of inputstr is Yo . Hit enter to exit. >>> ================================ RESTART ================================ >>> Let me find a Fibonacci number for you. Which one would you like? Enter a whole number. 5 The 5th Fibonacci number is 5. >>> ================================ RESTART ================================ >>> Let me find a Fibonacci number for you. Which one would you like? Enter a whole number. 10 The 10th Fibonacci number is 55. >>> ================================ RESTART ================================ >>> Let me find a Fibonacci number for you. Which one would you like? Enter a whole number. 36 The 36th Fibonacci number is 14930352. >>>