On Tue, Dec 29, 2015 at 11:52 AM, Nathan Clark <26110...@gmail.com> wrote:
> This is a fibonnaci sequence generator, the colon causes a syntax error > > > #set variables > num_1 = 1 > num_2 = 2 > count = 0 > terms = int(input("How many terms of the fibonnaci sequence would you > like?") > > > #function > while terms != count : > num_3 =num_1+num_2 > print (num_3) > num_1=num_2 > num_2 = num_3 > this can be simplified to num_1, num_2 = num_2, num_3 > count=count+1 > else: > print ("finished") > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > -- Joel Goldstick http://joelgoldstick.com/stats/birthdays _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor