Roundup Tracker - Issues

Message6409

Author When in trouble, go to the library
Recipients When in trouble, go to the library
Date 2019-03-22.11:04:36
Message-id <1553252676.79.0.946929221855.issue2551031@roundup.psfhosted.org>
In-reply-to
REVISING HYPOTHESIS THAT THE ERROR MUST BE LOCATED IN THE LAST LINE OF
THE BODY
mach_n(f,n-1)

COMPILER COULD JUST HAVE EXECUTED f

APPROACH:
COMPARE  

def mach_n(f,n):
    if n <= 0:
        return
    else:
        f
        mach_n(f,n-1)

TO ITS MODEL

def print_n(s,n):
    if n <=0:
        return
    print (s)
    print_n(s,n-1)

BY DOWNEY WHICH WORKS. IS THERE A DIFFERENCE WITHIN THE RESPECTIVE CODE?

ANSWER: THERE IS NO else: IN def print_n(s,n):, THE CODE FOR n > 0 IS
INDENTED LIKE else: WOULD HAVE BEEN, EXACTLY BELOW if

-> NEXT STEP:
ERASE else: IN def mach_n(f,n):
INDENT  f
        mach_n(f,n-1)
LIKE print (s)
     print_n(s,n-1)IN def print_n(s,n):
History
Date User Action Args
2019-03-22 11:04:36When in trouble, go to the librarysetmessageid: <1553252676.79.0.946929221855.issue2551031@roundup.psfhosted.org>
2019-03-22 11:04:36When in trouble, go to the librarysetrecipients: + When in trouble, go to the library
2019-03-22 11:04:36When in trouble, go to the librarylinkissue2551031 messages
2019-03-22 11:04:36When in trouble, go to the librarycreate