What this error want to say? Can't we use return without function?

Shivlal Sharma sshivlal9601 at gmail.com
Mon Sep 7 03:08:54 EDT 2020


N = int(input("enter a positive integer:"))
coun = 1
while (N > 0):
    coun = coun * N
    N = N - 1
return coun
nice = ntime(N)
print(nice)


error: return outside of the function


More information about the Python-list mailing list