Question: def alpha _ length ( string ) : character = count _ alpha = 0 # Complete the for loop sequence to iterate

def alpha_length(string):
character =""
count_alpha =0
# Complete the for loop sequence to iterate over "string".
for ___:
# Complete the if-statement using a string method.
if ___:
count_alpha +=1
return count_alpha
print(alpha_length("This has 1 number in it")) # Should print 17
print(alpha_length("Thisisallletters")) # Should print 16
print(alpha_length("This one has punctuation!")) # Should print 21

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!