Skip to content
Sign upLog in
← Back to Community

What am I doing wrong with string interpolation?

Profile icon
HilareeSchultz

In the String Interpolation part of my repl, can someone tell me what I am doing wrong pretty please? I am trying to print the same sentence as the String Concatenation section using the same constant....thank you in advance and I will continue to research

Voters
Profile icon
DeadStorageAcc
Profile icon
HilareeSchultz
Comments
hotnewtop
Profile icon
SixBeeps

Remove the pound signs from the left and right of the string. Only use those if you want to force Swift to not interpolate by using that syntax.

Profile icon
HilareeSchultz

I believe that I am allowed to use a calculator to find the new goal and just use interpolation to print the message according to the instructions. I am confident that I have it correct thanks to your advise it is much appreciated!

Profile icon
HilareeSchultz

Wow that was simple...thank you much.....now I need to print the average calories and add 100 to find the calorie goal using string interpolation as well this one has me very stuck. All the research that I have done so far doesn't give me any clue as for how to do this. Of course I can find it in 10 seconds with a calculator, but that doesn't help me much