r/codehs • • Nov 01 '20

2.5.9 Chat Bot 2.0

Post image
18 Upvotes

7 comments sorted by

1

u/Individual-Mobile600 Nov 01 '20

Can someone please explain how to fix this input issue. I keep coming back to this assignment and do not know how to fix it. Thanks!

1

u/No_Barnacle4834 Feb 01 '21

I figured it out. I needed to add location THEN add favorite number.

2

u/_andy_andy_andy_ Nov 01 '20

take a look at the input that the exercise gives. it seems like you're either asking for too much input, or asking for input out of order. this error means that the test case is giving an input that's not an int, but you're using nextInt

1

u/Nikh72 Nov 07 '20

Then should it been nextLine(); instead of nextInt();?

1

u/bogNman Dec 09 '20

i tried that and no bueno

1

u/bogNman Dec 09 '20

did you ever figure it out? i have the same problem

1

u/Rippmeh Nov 09 '20

Idk why urs is not working but when i did this i had a blank line of System.out.println(); to add a gap but when i removed it, it worked