Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLuis Aguayo
Courses Plus Student 922 PointsC# Escape sequence Quiz
For quiz, I cut this code out and it is doing exactly what I am being asked to do, but I am still wrong. Why?
using System;
class Program
{
static string Quote(string uno)
{
return $"\" {uno} \"";
}
// YOUR CODE HERE: Define a Quote method!
static void Main(string[] args)
{
// Quote by Maya Angelou.
Console.WriteLine(Quote("When you learn, teach. When you get, give."));
// Quote by Benjamin Franklin.
Console.WriteLine(Quote("No gains without pains."));
}
}
1 Answer
KRIS NIKOLAISEN
54,972 PointsIf you check the preview you will see the issue is the spaces between the quotes and the text. Remove the spaces and you are good. The test shows:
" Patrick, I don't think wumbo is a real word. "
instead of
"Patrick, I don't think wumbo is a real word."