Last answered:

06 May 2024

Posted on:

20 Nov 2022

0

Using Methods in Python

The code print('The first participant is ' +Participants[0]+'.')is not working very well .. it show an error

2 answers ( 0 marked as helpful)
Instructor
Posted on:

29 Nov 2022

0

Hi Muhammad!
Thanks for reaching out!

Could you please support your question with a screenshot containing the entire error message you’ve encountered? This can help us assist you better. Thank you.

Looking forward to your answer.
Best,
Tsvetelin

Posted on:

06 May 2024

0

Hey Faisal,

Please convert the "numbers" to string first, then you can concatenate it with the other strings. Use the following code,

print('The first participant is ' +str(Participants[0])+'.')

Submit an answer