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?

8th Mar 2018, 4:28 PM
Josh Redmon
Josh Redmon - avatar
3 Antworten
+ 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))
8th Mar 2018, 5:01 PM
John Wells
John Wells - avatar
+ 1
you both were helpful. thanks
8th Mar 2018, 5:07 PM
Josh Redmon
Josh Redmon - avatar
0
I think that you can add this to the return statement inside the function: return "Doctor"+name
8th Mar 2018, 4:49 PM
HBhZ_C
HBhZ_C - avatar