Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to convert this iterative code on Python into a recursive code. RESTRICTIONS: No lists, No modules are allowed to be imported. The Question

I need to convert this iterative code on Python into a recursive code.

RESTRICTIONS: No lists, No modules are allowed to be imported.

The Question is that in a string, i have to remove non alphabetic characters such as numbers, symbols and whitespaces.

" 67&* bbbc&" should give "bbbc"

ITERATION CODE:

def remove_nonalpha(string): s = "" for i in string: if i.isalpha() == True: s = s + i return s

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions

Question

1. Let a, b R, a Answered: 1 week ago

Answered: 1 week ago

Question

understand the key issues concerning international assignments

Answered: 1 week ago