Finding sum of numbers

 sum = 0

for i in range(1,51):
    sum= sum+i
print("Sum =",sum)


Sum = 1275

Comments

Popular posts from this blog

Digital Clock with Arduino and RTC Module and P10 LEDmatrix

Proteus simulation 4x4 Matrix Keypad with Arduino and LCD screen

Interfacing MQ2 Gas & Smoke Sensor With Raspberry Pi Pico