# de oorspronkelijke boodschap bdschp = '92905' # som van de getallen berekenen som = int (bdschp [0] ) + int (bdschp [1]) + int (bdschp [2]) +int (bdschp [3]) + int (bdschp [4]) # som van de cijfers omzetten naar string som_str = str(som) # eerste cijfer van de som_str is de contr_cijfer contr_cijfer = som_str [0] # controle cijfer toevoegen aan boodschap te_versturen_boodschap = bdschp + contr_cijfer # output naar interpreter window print (te_versturen_boodschap)
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question