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
Answer the question in the picture above.
Anvisha [2.4K]

Answer:

m is less than A apparently

Step-by-step explanation:

3 0
3 years ago
Shondra ordered 5 t-shirts for her friends and paid $54.95 for all of them. How much did each shirt cost her?
GarryVolchara [31]
$10.99 , divide 54.99 by 5 to get 10.99 for each shirt
5 0
3 years ago
Read 2 more answers
Solve for s.<br> 8 - 4s = s + 13
Andrej [43]

Answer:

s= -1

Step-by-step explanation:

5 0
2 years ago
V=D/T Solve for T. In two Steps and an Answer.
elena-14-01-66 [18.8K]

Answer:

t=v/d

Step-by-step explanation:

id think that there are two steps

v=d/t

divide D on both sides

v/d=d/t/d

v/d=t

7 0
3 years ago
Read 2 more answers
The size of a rectangular photo frame is 12 11/16cm by 8 3/4cm. Which of the following gives the product of these dimensions rou
Alexxx [7]

Answer:

D

Step-by-step explanation:

the answer can't be A or C because we know that 8 3/4 rounds to 9

so we have to figure out if 12 11/16 is closer to 12 or 13

anything above 8/16 should round up; therefore, 11/16 should round the 12 to be 13

8 0
3 years ago
Other questions:
  • In a circle, a central angle whose measure is pi/2 radians intercepts an arc whose length is 3pi/2 centimeters. How many centime
    7·1 answer
  • Estimate 23,945 + 46,718 by rounding to the highest place value.
    11·1 answer
  • Evaluate the expression.<br> 39 + 3(4 + )
    15·1 answer
  • If a driver gear has 15 teeth and the follower gear has 5 teeth, what would the gear ratio be?
    13·2 answers
  • Need Help
    5·1 answer
  • 10% of____= 1.2<br> Helppppp please
    5·1 answer
  • Help me please i need some help.
    6·1 answer
  • What is equivalent <br><br> 2r+(t+r)2
    12·1 answer
  • Enter the equation of the line meeting the given conditions. Please put the equation instandard form.
    10·1 answer
  • Whats the solution set of the following equation -8×+×+15=-7×+12
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!