Math Problem Statement

Compléter la fonction Somme en respectant la spéci cation . def Somme(n): ''' Entrée: n-int entier naturel superieur ou egal à 1 sortie :-int la somme 1+2+...+n ''' #Vérification de précondition assert n>=1 ,"l'entier n doit être strictement positif" #Code à écrire #.............

Solution

Ask a new question for Free

By Image

Drop file here or Click Here to upload

Math Problem Analysis

Mathematical Concepts

Arithmetic
Summation
Number Theory

Formulas

Sum of first n natural numbers: S = n(n + 1) / 2

Theorems

Summation formula for natural numbers

Suitable Grade Level

Grades 5-7