There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
print “There is something wrong with this thring!:”
user_input= gets.chomp
As julesbayon I’ve been trying many different things even copy and past the 1st exercise but the error message is always the same: Your code doesn’t look quite right. Check the first exercise if you need help!
Hi people! first of all forgive for my english, it is not so good.
When I run the code using the command gets.chomp what i am putting in the keyboard does not appear in the execution area. After sometime the message “execution expired” appear.
Hello there! I know I’m late to the conversation, but I figure it could help in the future some newcomers like me!
So, I had a hard time with this exercice, even after copypasting from the first exercice.
Here is the key: the problem is probably not what you wrote in the central section.
The thing is that you need to write gets.chomp again in the right section, where the cursor blinks. (Sometimes we need to click a few times on the blinking cursor to sort of activate it)
Being new to Ruby, I don’t quite understand why it worked, but it did.
So, to be cristal clear, here’s what I wrote in the central section:
print "I hope I get this right!: "
user_input = gets.chomp
I RUN the thing, and then on the right section of the screen appears:
I hope I get this right!: (followed by the blinking cursor)
You just need to add: gets.chomp after the cursor.
print "What did you eat today? "
user_input = gets.chomp
For eg. I type pasta but then it throws the error “execution expired” and “Your code doesn’t look quite right. Check the first exercise if you need help!”
After pressing Run, you need to keep clicking on the blinking cursor in the terminal (right-hand side of "Write something: "). It will eventually let you type something. If it doesn’t let you write anything, click again on the blinking cursor, and try writing once more.