You have to calculate the sum of all the numbers between 1 and 1000. How can you apply the approach of computational thinking and devise a solution which is general in nature and can be programmed into a computer? Mention your steps under appropriate headings of Decomposition, Pattern Recognition, Abstraction and Algorithm Design.
Note that your solution may vary from ours as there can be multiple ways in which Computational Thinking can be applied in solving this problem.
Answers
Answered by
0
first term a = 2 , d = 1 , n = 998
Sn = n/2 { 2a+(n-1) d}
= 998/2{ 2×2+(998-1)×1}
= 499{ 4+997}
= 499× 1001
= 4103099
Similar questions
English,
1 month ago
World Languages,
1 month ago
Science,
1 month ago
Social Sciences,
2 months ago
Math,
2 months ago