1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] creating a Python script with a recursive function to display the sum of the first n...

Discussão em 'Python' iniciado por Stack, Novembro 21, 2025.

  1. Stack

    Stack Membro Participativo

    what is wrong with this code(newbie)

    def find_sum (n):
    sum_num = (n * (n + 1)) / 2
    n=int(input ("Enter a number: "))
    return sum_num
    print("The sum of first"+sum_num)

    Continue reading...

Compartilhe esta Página