1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Free_Kalibri [48]
2 years ago
10

An arithmetic progression is a sequence of numbers in which the distance (or difference) between any two successive numbers if t

he same. This in the sequence 1, 3, 5, 7, ..., the distance is 2 while in the sequence 6, 12, 18, 24, ..., the distance is 6. Given the positive integer distance and the positive integer n, associate the variable sum with the sum of the elements of the arithmetic progression from 1 to n with distance distance. For example, if distance is 2 and n is 10, then sum would be associated with 25 because 1+3+5+7+9 = 25.
Mathematics
2 answers:
earnstyle [38]2 years ago
3 0

Answer:

Step-by-step explanation:

Solution:

- We are to write a program for evaluating the sum to Nth of an arithmetic sequence such that the sequence starts from positive integer 1, 3 , 5 , 7 , .. n.

- The sum to nth for the arithmetic series is given by two parameters i.e first integer a = 1 and the distance between successive integers d = 2 in our case.

- For any general distance d we can write our sum to nth as:

          Sum to nth = a + (a+d) + (a+2*d) + (a+3*d) .... (a + (n-1)*d)

- From above sequence we can see that every successive number is increased by distance d and added in previous answer.

- We will use an iteration loop for a variable "sum", which is cycled by a "range ( , , )" function.

- The parameters of the range functions corresponds to:

                   range ( first integer , last integer , step size )  

                   range ( a , n + 1 , d )

- Then we can cast the loop as follows:

 " int sum = 0

   int d = 2

   int a = 1

      for i in range ( a , n + 1 , d )

            sum += i

  "

- We see that iteration parameter i starts from a = 1, with step size d = 2 and the sum is previously stored sum value plus i for the current loop.

monitta2 years ago
3 0

Answer:

def arithmetic (n, dist):

           sum = 0

           for num in range(1, n + 1, dist):

                    sum += num

           print(sum)

arithmetic(10, 2)

Step-by-step explanation:

The question asked us to write a program given the positive integer n, and positive integer distance and then associate the variable sum with the sum of the elements of the arithmetic progression from 1 to n with distance.

using python the code can be written as:

def arithmetic (n, dist):

I wrote a function that accept 2 argument n the positive integer and the distance , dist.

sum = 0

The sum is equal to 0 at the beginning.

for num in range(1, n + 1, dist):

The code loop through the number in the range of 1 to the n value with a distance value.

sum += num

The looped value are then added to the sum value to get the sum.

print(sum)

The sum are printed

arithmetic(10, 2)

The function is called and filled with the required argument . In our case the positive integer n is inputted and the distance value.

You might be interested in
Tell whether the equation has one, zero, or infinitely many solutions.2(x − 3) + 4 = 1x − 5.
tankabanditka [31]

Answer:one solution

Step-by-step explanation:

x=-3, TeR

3 0
2 years ago
10x-15=-8x+21 solve this equation
Natasha2012 [34]

Answer:

x=2

Step-by-step explanation:

8 0
3 years ago
Y=<br> Pls help solve for
miss Akunina [59]

Answer:

y=39\degree

Step-by-step explanation:

The given triangle is a right angle triangle .

The known sides of the triangle that is opposite to angle y is 8 units while the side adjacent is 10 units.

The value of y can be calculated using the tangent ratio.


\tan(y)=\frac{8}{10}

We solve for y to get,

y=arctan(\frac{4}{5})

We evaluate to obtain,

y=38.66


y=39\degree to the nearest degree


8 0
3 years ago
2x ^2 −5=3x
expeople1 [14]

Answer:a

Step-by-step explanation:

3 0
3 years ago
You are running a concession stand at a basketball game. You are selling hot dogs and sodas. Each hot dog costs $1.50 and each s
irga5000 [103]

The answer is add 35 and 52 and you will get 87 which was supposed to be the amount sold

4 0
2 years ago
Other questions:
  • Amanda has 26 nickels and dimes in her piggy bank. the number of nickels is two fewer than three times the number of dimes. how
    9·1 answer
  • A bag contains four red marbles, two green ones one lavender one two orange marbles how many sets of five marbles include at mos
    14·1 answer
  • Graph the line with Slope 8 and y-intercept -7
    12·1 answer
  • Please help with math homework!
    10·1 answer
  • What is the approximate volume of a cylinder with a radius of 8 cm and height of 5 cm?
    7·1 answer
  • Which of the following quadrilaterals have diagonals that bisect each other?
    6·1 answer
  • Rob buy 6 tickets to the basketball game he pays $8.50 for parking. His total cost is $40.54. What is the cost of each ticket?
    14·1 answer
  • Find the rate of change.​
    11·2 answers
  • Need help please explain why its the answer and show work
    7·2 answers
  • PLEASE ANSWER ASASP<br> -5y + 4 = -11<br> what is y?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!