[Tutor] Problem with little program
Marco Rompré
marcodrompre at gmail.com
Sat Mar 13 19:56:34 CET 2010
Hello I have a little problem, I am trying to define a function ligneCar(n,
ca) that would print n times the caracters ca.
For now I have the user entering a short sentence corresponding to ca.
Here is my code:
def ligneCar(n,ca):
c=0
while c<n:
print ca
c+=1
ca = input ('Enter a short phrase : ')
n = input ('Enter how many times you want : ')
Thats the definition of my function ligne_Car
then in another python file
I want to recall my function ligne_Car but it is not working.
Please help me
--
Marc-O. Rompré
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100313/1249a867/attachment.html>
More information about the Tutor
mailing list