Question: Python The following code contains one or more syntax errors. Fix it so that the code returns number of characters in s. Do not use
Python The following code contains one or more syntax errors. Fix it so that the code returns number of characters in s. Do not use the built in count method. ... ... 0/3 points Attempts: 0 / Unlimited 1. def num a(s): 2 3 Returns the number of 'a' characters in s 4 5 ct = 0 6 If s[@] 7 ct - 1 8 elifs: 9 return @ 10 return ct + num a's 1:1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
