+ 2

16.2 practice

Not sure why my code isn’t working. Tried a few different ways. Any suggestions? inp = input() print('***' + inp + '***')

17th May 2021, 5:09 PM
Reagan Keith
Reagan Keith - avatar
5 odpowiedzi
+ 7
You missing 2 spaces around inp . print("*** " + inp + " ***")
17th May 2021, 5:14 PM
TOLUENE
TOLUENE - avatar
+ 4
we don't need to take care about spaces. it can be done like: print("***", inp, "***")
17th May 2021, 5:24 PM
Lothar
Lothar - avatar
0
Thank you Sayed! All worked out with the spaces
17th May 2021, 5:26 PM
Reagan Keith
Reagan Keith - avatar
0
Right code is text = input() output = "*** " + text + " ***" print(output)
9th Oct 2021, 9:38 AM
Sankalp Singh
0
This definitely works
9th Oct 2021, 9:38 AM
Sankalp Singh