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

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -