Skip to content
New Workbook
Sign up
Untitled Python workspace
##list1 = [1, 2, 3, 4, 5, 6, 7, 8 ,9]
##list2 = [3, 9]

## cycle through 2nd list removing the numbers from 1st list
##for x in range(len(list2)):

   ## [list1.remove(list2[x])]
## print(list1)


import random 

balance = 0
dep = 1200
time = 20
ftse = random.gauss(12.2, 6.75)
sp500 = random.gauss(18, 9.3)
for multiple_timelines in range (20):
    for save in range (1, time):
        sp500 = random.gauss(18, 9.3)
        interest = sp500/100
        if save%5 == 0:
            interest=interest*(-1)
#        print(interest)
        balance = balance + (balance * interest)
        balance = balance + dep
    for grow in range (10):
        ftse = random.gauss(13, 6)
        interest = ftse/100
        if grow%5 == 0:
            interest = interest*(-1)
        balance = balance + (balance * interest)
    print("£",round(balance,2))
    balance = 0