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

Android

reponse=console.readLine("do you understand do while loop") while (reponse.equalsIgnoreCase("no));

why its not working

3 Answers

Based on the snippet you provided. It's to hard to tell exactly. A do while loop is

Do (ask me if I understand loops) while (some condition is true)

In this instance it's an input from the user.

So you want to do something like this in pseudocode/real code lol.

Do reponse = console.readLine("do you understand do while loop") while (reponse.equalsIgnoreCase("no));

So ask me if I understand Python. And if I say no. Then it's going to ask me again and again and again. But if I say yes, then well, the while is false and the loop will exit.

Does that help you understand it better?

yes so is my code correct

if this is your code

reponse=console.readLine("do you understand do while loop") while (reponse.equalsIgnoreCase("no));

You tell me. Did you pass the challenge? That code is not wrapped in a do while loop. So no it's not correct as is.

so what is the code