Roundup Tracker - Issues

Message6393

Author When in trouble, go to the library
Recipients When in trouble, go to the library
Date 2019-03-15.10:03:51
Message-id <1552644231.6.0.00610835462997.issue2551028@roundup.psfhosted.org>
In-reply-to
INSERT 5 FOR n

def print_n(s,n):
    if n <=0:
        return
    print (s)
    print_(s,n-1)
    
s='beliebiger_string' #Platzhalter für die Definition von s

print_n(s,5)

RUN MODULE

 RESTART: C:\Users\Henrike
Schwenn\Roaming\Programs\Python\Python36\eigene Funktionen\rekursive
Funktionen\Test print_n(s,n) - Downey S. 58.py 
beliebiger_string
Traceback (most recent call last):
  File "C:\Users\Henrike Schwenn\Roaming\Programs\Python\Python36\eigene
Funktionen\rekursive Funktionen\Test print_n(s,n) - Downey S. 58.py",
line 12, in <module>
    print_n(s,5)
  File "C:\Users\Henrike Schwenn\Roaming\Programs\Python\Python36\eigene
Funktionen\rekursive Funktionen\Test print_n(s,n) - Downey S. 58.py",
line 8, in print_n
    print_(s,n-1)
NameError: name 'print_' is not defined
>>> 

TYPE: SYNTAX
History
Date User Action Args
2019-03-15 10:03:51When in trouble, go to the librarysetmessageid: <1552644231.6.0.00610835462997.issue2551028@roundup.psfhosted.org>
2019-03-15 10:03:51When in trouble, go to the librarysetrecipients: + When in trouble, go to the library
2019-03-15 10:03:51When in trouble, go to the librarylinkissue2551028 messages
2019-03-15 10:03:51When in trouble, go to the librarycreate