#creating a sigma function
a=int(input("enter a number for sigma "))
mylst=[]
for i in range(1,a+1):
mylst.append(i)
b=sum(mylst)
print(mylst)
print(b)
Code Example |
---|
Python :: python initialize dict with empty list values |
:: |
Python :: |
:: |
Python :: creating empty set and append python |
Python :: |
:: |
:: colors in scatter plot python |
Python :: python to mac executable |
:: |
Python :: |
:: |
Python :: find the highest id in model django |
:: pyqt button clicked connect |
Python :: handle 404 in requests python |
:: vim run python current file |
Python :: how to add new column in csv file using pandas |
:: |
:: how to unlist a list in python |
:: |
:: |
Python :: python dictionary append |
:: |
Python :: pandas return row |
:: |
Python :: roblox api python |
:: |
:: how to send file in python request |
:: |
:: how append a directory based on current directory python |