Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

What am I doing wrong with string interpolation?

HilareeSchultz
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

3 years ago

Voters

Comments

TopNew
1
HilareeSchultz
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!

3 years ago
1
HilareeSchultz
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

3 years ago
3
SixBeeps
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.

3 years ago
Load more