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]
3 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]3 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.

monitta3 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
Solve for x <br> - 4x + 5 = -2x-1
Travka [436]

Answer:

the awncer to your question is x=3

Step-by-step explanation:

4 0
3 years ago
Read 2 more answers
I need help please urgent
Vanyuwa [196]

Answer:

its ok don't worry

Step-by-step explanation:

its a mental answer

6 0
3 years ago
Sebastian is going to deposit $790 in an account that earns 6.8% interest compounded annually his wife Yolanda will deposit $815
marissa [1.9K]

Answer: sorry dont know what to tell you im struggling too

Step-by-step explanation:

:(

4 0
3 years ago
A semicircle has an area of 76.97 squared km. Find it’s radius
shtirl [24]

Answer:

7 km

Step-by-step explanation:

Substitute:

The equation for area of a semi-circle is \frac{r^{2}\pi }{2}

A =  \frac{r^{2}\pi }{2}

76.97 =  \frac{r^{2}\pi }{2}

Multiply by 2 on both sides:

2(76.97) = ( \frac{r^{2}\pi }{2})2

153.94 = r^{2} \pi

Divide by pi on both sides:

153.94 = r^{2} \pi

/pi           /pi

49.03 ≈ r^{2}

Find the square root:

\sqrt{49.03} =\sqrt{r^{2} }

7 = r

7 0
3 years ago
20 POINTS PLEASE HELP ASAP!!!
Alika [10]

Answer: :(

Step-by-step explanation: you said 20

8 0
3 years ago
Other questions:
  • en una granja hay 300 gallinas que se comen un camion de grano en 20 dias . si se compran 10 gallinas mas en cuanto tiempo se co
    6·1 answer
  • Naomi wants to buy a new computer for $840. She is considering two payment plans that require weekly payments. Which plan will p
    10·1 answer
  • Doreen and Irena plan to leave their houses at the same time, roller blade towards each other, and meet for lunch after 2 hours
    9·1 answer
  • Can you answer that but simply make it look it easy
    7·1 answer
  • Select all possible solutions for 2x + 7 &lt; 3x - 5.
    12·1 answer
  • What is the equation of the line that passes through the point ( -1, 1) and is perpendicular to 2x + 4y = 16?
    15·1 answer
  • Assume the company surveys only people living in mountainous regions. If the company makes a generalization from this survey, ho
    11·1 answer
  • There are 10 board members on the Community Arts Council. In how many ways can a president and treasurer be chosen
    14·1 answer
  • 3 2/3 + 2 3/5 + x = 8
    9·1 answer
  • PLEASE HELP ASAP
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!