On 01/04/14 00:22, Scott Dunning wrote:
def print_n(s,n):
i = 0
while i < n:
print s,
i += 1
print_n('a',3)
Also, with this exercise it’s using a doctest so I don’t actually call the
function
I have no idea what you mean buy this?
There is no doctest above and you do call the function...
so I can’t figure out a way to make the string’s print on
> separate lines without changing the doctest code?
You don't have any doctest code and the printing on one line
is a result of the comma in the print statement.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor