#! /usr/local/bin/python #-*- coding: latin-1 -*- # # Brendan Gillatt # # MIT License # #Prints the terms of a given quadratic sequence. #E.G. 3n²+2n+1 would output 6, 17, 34, etc. A = int(raw_input(' ný: ')) #Enter part like the above '3n²' B = int(raw_input(' n: ')) #Enter part like the above '2n' C = int(raw_input(' +-: ')) #Enter part like the above '1' range1 = int(raw_input('from: ')) #Enter start term range2 = int(raw_input(' to: ')) + 1 # Enter end term #print ' ' #print 'Number | Term' #print ' ' for count in range(range1, range2): first = A*count**2 second = B*count third = C out = first + second + third print out, ' | ', count