Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def profile():
- profile = input("Write something about yourself - max. 10 words\n")
- word_count = 0
- for word in profile:
- if word != " ":
- continue
- else:
- word_count = word_count + 1
- word_count = word_count + 1
- return word_count
- word_count = profile()
- while word_count > 10:
- print("I'm sorry, those are " + str(word_count) + " words. The maximum is 10 words.")
- profile()
- word_count = profile()
- if word_count <= 10:
- print("Alright, those are " + str(word_count) + " words. You can post it!")
- break
- else:
- word_count <= 10
- print("Alright, those are " + str(word_count) + " words. You can post it!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement