+ 1

Pls what is wrong with this code?it is not giving me the desired output.

def Thank_you( names): print("Thank you for being a good friend,+ names") Thank_you(Sam) Thank_you(Dave)

17th May 2018, 10:54 PM
kehinde Onoba
4 Answers
+ 2
Try this: def Thank_you(names): print("Thank you for being a good friend, " + names + ".") Thank_you("Sam") Thank_you("Dave")
18th May 2018, 12:10 AM
Nick
Nick - avatar
0
you can not include the +variable within the quotes. you may append is after the quotes or with "some string {0}".names
17th May 2018, 11:01 PM
error on line 1
error on line 1 - avatar
0
thanks for your response it was helpful
22nd May 2018, 10:45 PM
kehinde Onoba
0
kehinde Onoba Happy to help :)
22nd May 2018, 10:48 PM
Nick
Nick - avatar