Mathématiques

Question

bonjour, besoin d'aide svp
bonjour, besoin d'aide svp

1 Réponse

  • Réponse :

    Explications étape par étape

    Exercice 1

    1)

    a)

    i  x  S

    0 5 5

    1 25 30

    2 125 155

    3 625 780

    4 3125 3905

    b)

    L'algorithme calcule la somme 5 + 5² + 5^3+5^4

    2) Syracuse

    3

    10

    5

    16

    8

    4

    2

    1

    4

    2

    Programme Python

    def syracuse(N):

      A=N

      print(A)

      for i in range(1,10):

         if A%2==0:

             A=(A//2)

             print(A)

         else:

             A=(3*A+1)

             print (A)