Hi. First of all, you should mention which language you're working with, and probably add your code too. Because I already solved this kata in C#, I can see your code, so... The problem is that string in C# is immutable. You need to create a new modified string. Also, the function signature expects you to return a new string, but it doesn't look like you returned anything.
Your problem is in the part you change
sum
value. That input gives you a value of 0.It's true, you cannot do
c.ToUpper()
, but you can doChar.ToUpper(c)
. See https://learn.microsoft.com/en-us/dotnet/api/system.char?view=net-8.0#methods to see what's available withchar
datatype. Also, be vary of typos, all methods in C# start with uppercase.Hi. First of all, you should mention which language you're working with, and probably add your code too. Because I already solved this kata in C#, I can see your code, so... The problem is that
string
in C# is immutable. You need to create a new modified string. Also, the function signature expects you to return a new string, but it doesn't look like you returned anything.Not that one, maybe it's
using System.Linq
the one you missed.Maybe you're missing some
using
there?