Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

613 Accmulator Patt C Computer Science ques x C ??? https://relate.cs Ilinois.ed

ID: 3698985 • Letter: 6

Question

613 Accmulator Patt C Computer Science ques x C ??? https://relate.cs Ilinois.edu/coursees101-sp18/flor session/39e222/5/ Accumulator Pattern 1 point Compose a program which tests whether each character in a string text is alphabetic or not. If it is not, then the character should be appended to a accumulator string non_alpha The text used is taken from T. S. Eliot's "Choruses from The Rock" Starter code (cdick to view) text o world of spring and autumn, birth and dying! non_alpha for??? in text: if???.isalpha(): 43 2U18-04-027

Explanation / Answer

text = 'O world of spring and autumn, birth and dying!' non_alpha = '' for ch in text: if not ch.isalpha(): non_alpha += ch