Building Software I 2559
Sunday, September 27, 2015
Lab5 - Increase/decrease values in array (by fixed value or percentage)
def setup():
n=[5,8,9,7,5,3,2,9]
i=0
percent=int(input())
while(i<=len(n)):
n[i]=n[i]+((percent*n[i])/100)
print("Value of n[",i,"] is ",n[i])
i+=1
setup()
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment