{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Ouen though we just perform the repellve task

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: out the elegant and beauLful closed formula soluLon, we can program that of course   AUer all, we can calculate N*(N+1)/2 as a Python expression! • OUen, though, we just perform the repeLLve task explicitly • Computers are good at boring, repeLLve jobs! 5 Repe$$on and Compu$ng Start • Summing by repeLLon Ask for N • IniLalize sum to 0 TRUE count<= N? • Keep increasing count unLl we reach the last element FALSE sum = sum +...
View Full Document

{[ snackBarMessage ]}