[Python] Python program that prints numbers from 1000 down to 1 without using any loops (for,...

Discussão em 'Python' iniciado por Stack, Abril 24, 2025.

  1. Stack

    Stack Membro Participativo

    i solve problem but its print till 2 and got an error :

    def reverse_count(n):
    if n == 0:
    return 0
    elif n < 1:
    return
    print(n)
    # Recursive call with n-1
    reverse_count(n - 1)

    # Call it starting from 1000
    reverse_count(1000)


    to see my code and find a problem where i did mistake

    Continue reading...

Compartilhe esta Página