I’m trying to make a word generator but it wont work when I put in my number.
This is what it said:
Traceback (most recent call last):
File “C:\Users\private\Desktop\private\Programming By Me\Random Word Generator.py”, line 4, in
for number in range (number):
TypeError: ‘str’ object cannot be interpreted as an integer
number = input("How much words would you like to generate?") import random a = ["Bird", "Notebook", "Word"] for i in range (number): print (random.choice(a))
What is wrong with it?