📌  相关文章
📜  s=0 def sum(x,y): n=int(input("enter no. of terms") for i in range(n): l=int(input("enter no.")) s=s+ l print(s) sum() - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:22.230000             🧑  作者: Mango

代码示例1
s=0
def sum(x,y):
    n=int(input("enter no. of terms")
          for i in range(n):
          l=int(input("enter no."))
          s=s+l
    print(s)
sum()