color = input("enter a color: ")
plural_noun = input("Enter a plural noun : ")
celebrity = input("Enter a celebrity: ")
print("roses are {color}")
print("{plural_noun) are blue")
print("i love {celebrity}")
This is the traceback i get
Error:
/Users/dharamchandsethia/PycharmProjects/Volatility/venv/bin/python /Users/dharamchandsethia/PycharmProjects/Volatility/Test.py
enter a color: red
Traceback (most recent call last):
File "/Users/dharamchandsethia/PycharmProjects/Volatility/Test.py", line 1, in <module>
color = input("enter a color: ")
File "<string>", line 1, in <module>
NameError: name 'red' is not defined
Do i need to define the variable color before or i can ask for user input.