in a certain supermarket , a triangular display of cans is arranged in 9 rows , numbered 1 through 9 from top to bottom . each successively numbered row contains 3 more cans than the row immediately above it . if there are fewer than 120 cans in the entire display , how many cans are in the seventh row ?
import math
n0 = 9.0
n1 = 1.0
n2 = 9.0
n3 = 3.0
n4 = 120.0
t0 = n3 + n3
t1 = n0 - n1
t2 = n3 * t1
t3 = n3 * t0
t4 = t2 / 2.0
t5 = n0 * t4
t6 = n4 - t5
t7 = t6 / n0
t8 = math.floor(t7)
answer = t8 + t3
print(answer)