0

Why I can't print out: "13 is great !" ?

j=13 while 1==1: print(j+"is"+"great") j+=1 if j>=14: print('!') break

20th Mar 2019, 7:58 PM
Joe Lishuai Lin
Joe Lishuai Lin - avatar
1 Antwort
+ 5
You can't add/concatenate integers and strings. Try print(j, 'is great') or print(str(j) + ' is great')
20th Mar 2019, 8:02 PM
Anna
Anna - avatar