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 trialMUZ140118 Cathrine Makuya
10,300 PointsSTAGE 2 challenge 3
output a sentence that takes both the noun and past tense verb using a single sentence.it should look like this :name really past tense verb this coding exercise
String name=console.readLine("really");
String pastTenseVerb=console.readLine("coding exercise");
console.printf("%s really %s",thisCodingExercise);
1 Answer
Ken Alger
Treehouse TeacherWelcome to Treehouse!
As you work your way through the challenges they are all rather literal in terms of what they want the output to be. For example when the challenge says for the output to: It should look like this: name really past tense verb this coding exercise. It would want the output to be Sam really enjoyed this coding exercise.
Assuming that the inputted name was Sam
, and past tense verb was enjoyed
.
So, for this challenge you would want your code to look similar to:
String name = console.readLine("Enter your name: "); // Task 1
String pastTenseVerb = console.readLine("Past Tense Verb: "); // Task 2
console.printf("%s really %s this coding exercise", name, pastTenseVerb); // Task 3
I hope that helps and makes some sense.
Happy coding,
Ken
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherThe key is the string formatter(s) for this challenge overall and Task 3 in particular. Post back if it is not clear how they function because they are a key concept in the course.
Ken
MUZ140118 Cathrine Makuya
10,300 PointsMUZ140118 Cathrine Makuya
10,300 Pointsthank you very much