0

Help me to carecter this python code

#I want to add N numbers and Store in sum var. N = int(input()) #your code goes here sum = int(0) for x in range(0,N) sum = sum + (int)x else : sum+=N print(sum)

28th May 2022, 11:09 AM
RTB
RTB - avatar
3 ответов
+ 2
RTB #number of elements need to be add in total N = int(input()) total = 0 #don't use sum as a variable as it is a function in python for i in range(N): x = int(input()) total = total + x print (total)
28th May 2022, 3:36 PM
A͢J
A͢J - avatar
+ 2
A͢J thanks
29th May 2022, 11:09 AM
RTB
RTB - avatar
+ 1
#Help me to carecter this python code #I want to add N numbers and Store in sum var. N = int(input()) #your code goes here sum = int(0) for x in range(0,N): sum = sum + (int(x)) else : sum+=N print(sum)
28th May 2022, 12:25 PM
NEZ
NEZ - avatar