I have a simple script here and i want to use the user input from my_function as argument for my otehrfunction:
def otherfunction(lname):
print("This is the otherfunction. " + lname + " is your lastname")
def my_function():
#b = "Black"
b = input("Enter your name: ")
otherfunction(b)
my_function()
when i use variable b and set it to b= "Black", the script does what it is supposed to do but when i say b = input(....) i get this error:
Enter your name: black
Traceback (most recent call last):
File "function.py", line 44, in <module>
my_function()
File "function.py", line 41, in my_function
b = input("Enter your name: ")
File "<string>", line 1, in <module>
NameError: name 'black' is not defined