0
Need help calling defined functions!!
Task: add "Doctor" title to a name *Define function MAKE_DOCTOR( ) that takes a parameter NAME *Get user input for variable FULL_NAME *Call the function using FULL_NAME as arguments *Print the return value This is my code but I am getting very confused: def make_doctor(name): full_name = input("Enter full name here: ") return name print(make_doctor("Doctor") + full_name) I know what I have is wrong. I keep trying but never succeed to get it right. Could someone please help?
3 odpowiedzi
+ 5
I think this is what your looking for:
def make_doctor(name):
return "Doctor "+name
full_name = input("Enter full name here: ")
print(make_doctor(full_name))
+ 1
you both were helpful. thanks
0
I think that you can add this to the return statement inside the function:
return "Doctor"+name