Last active
April 1, 2022 15:17
-
-
Save a1exDi/00c2ce4c46654176cb151128108b12ca 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
function count_letters(word) { | |
var count = 0; | |
for (var i = 0; i < word.length; i++) { | |
count += 1; | |
} | |
return count; | |
} |
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
def count_letters(word): | |
count = 0 | |
for i in word: | |
count += 1 | |
return count |
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
func count_letter(word: String)-> Int { | |
var count = 0 | |
for i in word{ | |
count += 1 | |
} | |
return count | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment