您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 

19 行
549 B

#!/usr/bin/env python3
#title :8-1.py
#description :Opdracht 8.1 - While-loop & numbers
#author :Marcel Haazen
#email :marcel@haazen.xyz
#date :28-10-2019 - 13:10
#version :0.1
#usage :python3 8-1.py
#notes :
#python_version :3.7.3
#==============================================================================
nl = []
n = None
i = 0
while n != 0:
n = int(input("Voer een nummer in: "))
nl.append(n)
i += 1
print("er zijn", i-1 ,"getallen ingevoerd, de som is:", sum(nl))