Mar-20-2019, 06:23 PM
Here's my homework assignment:
Write code to count the number of characters in original_str using for loop as a counter and assign the answer to a variable num_chars. Do NOT use the len function to solve the problem.
TypeError: start must be a integer on line 3
Write code to count the number of characters in original_str using for loop as a counter and assign the answer to a variable num_chars. Do NOT use the len function to solve the problem.
#Here's my attempt: original_str = "The quick brown rhino jumped over the extremely lazy fox." counter=0 for counter in range (original_str): counter = counter + 1 num_chars=counter print(num_chars)Here's error message:
TypeError: start must be a integer on line 3