The attendees have lined up for the group photo in a pyramid formation. The firs
ID: 3698884 • Letter: T
Question
The attendees have lined up for the group photo in a pyramid formation. The first row has 31 people; the second row has 26 people, the third row has 21 people, etc. The final row is row 7.
a. Use the formula for the nth term of an arithmetic sequence to determine the number of people in row 7.
b. Use the formula for the sum of an arithmetic sequence to determine the total number of people being photographed.
c. Write Python code that uses a for loop to generate and print the 7 terms of the photo sequence. The code should also calculate and print the sum of the 7 terms.
Explanation / Answer
''' a=31 d=-5 people in row 7=31+6*(-5)=1 total number=(7/2)*(31+1)=112 ''' a=31 d=-5 T=0 for i in range(7): print('row',i+1,':',a) T += a a=a+d print('Sum:',T)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.