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 trial

C# C# Basics (Retired) Console I/O Console I/O

Sarah Surve
Sarah Surve
788 Points

Why is This Giving Me the error for this question?

What is the right Answer for this Question?

string bookTitle="2020 Revolution";
System.Console.Write("Enter a book title:");

1 Answer

Jennifer Nordell
Jennifer Nordell
Treehouse Teacher

Hi there! You're doing great. Let's take a look at the "Bummer!" error message you're getting. Here it is: "Bummer! Make sure to use the exact message from the instructions. Note the trailing space. Copy/paste if you like!" Your code should look like this:

string bookTitle="2020 Revolution";
System.Console.Write("Enter a book title: ");  //note the space between the colon and the closed parenthesis

The string must be exactly the same. Your string is missing a space between the colon and the closed parenthesis. If you were to include a Read() after it, then run the code it would produce a prompt with no space after. The user would be typing their answer right up against that colon. We just want it to have a little breathing room there so that it looks nicer. Hope this helps! And yes, challenges are exceptionally picky! :sparkles: