On Mon, Sep 7, 2020 at 5:36 PM Shivlal Sharma <sshivlal9...@gmail.com> wrote:
>
> On Monday, 7 September 2020 at 12:57:16 UTC+5:30, Python wrote:
> > Shivlal Sharma wrote:
> > > 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
> > What did you expect return out of a function to even mean?
> I mean that can't we use return keyword outside of the function?

Well... no. What do you expect it to mean? It's like asking "why can't
I use 'else' without 'if'?" - there'd need to be some meaning for it.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to