python - New To Coding. Can anyone assist me? -
i trying make word counter , cant seem it. can help?
import re print("welcome software made aaron!") word = raw_input("enter words: ") check = 0 right = 0 length = len(word) while true: if right == 1: if length < check: check = check + 1 print(check) if length == check: right = 1 print("your word count " +check)
as guy said, learning code takes time, if starting must try avoid libraries work you, "length" . in case trying make own "length", doesn't make sense use it. "for" work perfect
word = raw_input("enter words: ") x = true counter = 0 w in word: counter = counter + 1 print("your word count " +counter) take codeacademy python's course
Comments
Post a Comment