@valoro/

series_1

Python

http://altocodigo.blogspot.com/2018/08/series-en-python.html

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.9038008789580958","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW5pY2lhbD0xMApmaW5hbD0yMAppbnRlcnZhbG89Mgp0b3RhbD0wICNpbmljaWFsaXphbW9zIGxhIHN1bWEgYSBjZXJvCmZvciBpIGluIHJhbmdlKGluaWNpYWwsZmluYWwsaW50ZXJ2YWxvKToKICB0b3RhbCs9aSAjbGEgdmFyaWFibGUgdG90YWwgYWN0w7phIGRlIGFjdW11bGFkb3IKICBwcmludChpKQpwcmludCgnTGEgc3VtYSBlczonLHRvdGFsKQ=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
inicial=10
final=20
intervalo=2
total=0 #inicializamos la suma a cero
for i in range(inicial,final,intervalo):
  total+=i #la variable total actúa de acumulador
  print(i)
print('La suma es:',total)