I am working on a basic project for a stickman game. My code so far is:
import random
list_of_words = ["Hello"]
word = str(random.choice(list_of_words))
char = int(len(word))
Since I am still working on it, I am only using 1 word instead of many which could complicate things more.
So how this should work is; there is a list of words. One of them gets randomly picked. Then it counts the amount of characters in the word. Lastly, it prints a certain number of underscores depending on the number of characters in the word.
In theory, if correct, it should work like this:
Word = Hello
Number of characters = 5
Result: _____ (5 underscores in one line)