I tried your code and it's Ok.
def somme_chiffre (n):
total = 0
nstring = str(n)
for chiffre in nstring:
total = total + int(chiffre)
print somme_chiffre (434)
Maybe you have to refresh your Browser
++++ reset of session *****************
under certain circumstances you can shoot your Browser in an
Therefor it is of an advantage to know that you have 2 reset facilities:
One is the use of the F5-key which does a refresh Browser
Two, select© your code
Then use the Reset Code button of the course-window,
then paste your code back in.
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom