![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Nov 2007
Posts: 14
Rep Power: 0
![]() |
Question Number 1
Hi All,
I am new. I have posted in the introduction forums. You can read my post there to get to know why I am here. As it says, I am a newbie. Teaching myself (with your help) Python. This is my first question, very basic but I'm starting right from the beginning. I am reading through a beginners book that was linked to another thread in this forum. It got me to create the following script def newLine():
print
def threeLines():
newLine()
newLine()
newLine()
def nineLines():
threeLines()
threeLines()
threeLines()
def twentysevenLines():
nineLines()
nineLines()
nineLines()
print "First Line."
twentysevenLines()
print "Second Line."No dramas at all. It just prints the first line, then 27 blank lines and then the second line. As an excercise the book gets me to: "move the last three lines of this program to the top, so the function calls appear before the definitions. Run the program and see what error message you get." This should be like this right? print "First Line."
twentysevenLines()
print "Second Line."
def newLine():
print
def threeLines():
newLine()
newLine()
newLine()
def nineLines():
threeLines()
threeLines()
threeLines()
def twentysevenLines():
nineLines()
nineLines()
nineLines()The only problem is I dont get any errors. It prints the first line, then 27 blank lines and then the second line just like the original script. What am I missing here? Should there be an error? |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| c-unix-childprocesses-random number | programmingnoob | C | 7 | Feb 6th, 2007 8:39 PM |
| very simple question. make button change number in edit box | nickm | Delphi | 2 | Apr 29th, 2006 10:47 PM |
| One more question infinite! | massive-war | C++ | 8 | Apr 11th, 2005 12:11 AM |
| non repeating random number generation | gencor45 | C# | 2 | Feb 9th, 2005 12:11 AM |
| Number Systems... | Ade | Coder's Corner Lounge | 7 | Jan 19th, 2005 5:32 AM |