Win a copy of Kotlin Cookbook this week in the Kotlin forum!

Mark Jinx

Greenhorn
+ Follow
since Jan 09, 2020
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mark Jinx

How would I be able to check if the letter from the user exists in the word and then output it onto the board?
2 weeks ago
2 weeks ago
I found another alternative for my code. Now I am stuck with the hints, how to repeat/refresh my variables if the user wants to play again and allow the user to only enter in one letter at a time.

2 weeks ago
My word is 'aposematic'. What I am trying to accomplish is that if the user enters 'a' I am trying to find the where both 'a' are located in the string. Then I would store those values and output on the board where both 'a' exists. Example, if the user enters 'a', I am trying to show the user that the 1st and 7th slot of the word has 'a'.
2 weeks ago
Thanks that really helped. For guessletter.indexOf('a',1), I am trying to find the location of the next 'a' that exists in the word. How would I adjust it to make it not return a -1?
2 weeks ago
Hey, I am a very new to computer programming and I need help debugging and understanding how to code hangman for a class. So far I only know the basics such as methods, classes, and objects but, I do not know anything about scanners. My program may look weak but it is hard for me. I need help on figuring out how to receive a letter from the user, checking it if it is valid and it exists in the word, if it does then outputs the letters that the user guess correctly and a loop that allows the user to re-enter until the user gets the word right.




2 weeks ago