I am trying to display "5 + 5 = 10" with the syntax as follows print ("2 + 2 = " + ( 2 + 2) ), what is the correct syntax to write it as i keep getting the error :
" TypeError: must be str, not int"
Appreciate the help :)
I tried : str ("2 + 2 = " + ( 2 + 2) )
You are trying to add a string "2 + 2 =" to an int (4). Turn the int into a string first and then add the two strings together: