Last active
September 19, 2022 12:45
-
-
Save cibofdevs/66db92c69ada97ea83c4c51162b30d44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Write code to count the number of characters in original_str using the accumulation pattern and assign the answer to a variable num_chars. | |
# Do NOT use the len function to solve the problem (if you use it while you are working on this problem, comment it out afterward!) | |
original_str = "The quick brown rhino jumped over the extremely lazy fox." | |
num_chars = 0 | |
for i in original_str: | |
num_chars = num_chars + 1 | |
print(num_chars) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment