Can't Save and Submit from Beginning


#1

Hi everyone. I've read quite a few of the related posts assisting with the "Putting the form in formatter" lesson. When I save and submit the little gear keeps turning. I've tried Chrome and Firefox to no avail.

Thanks for taking the time to read.


#In the "What you'll be building" portion all i do is change the questions to my answers.

print "What's your first name?"
first_name = gets.chomp
first_name.capitalize!

print "What's your last name?"
last_name = gets.chomp
last_name.capitalize!

print "What city are you from?"
city = gets.chomp
city.capitalize!

print "What state or province are you from?"
state = gets.chomp
state.upcase!

puts "Your name is #{first_name} #{last_name} and you're from #{city}, #{state}!"

#changed to this:

print "Francisco"
first_name = gets.chomp
first_name.capitalize!

print "Vicente"
last_name = gets.chomp
last_name.capitalize!

print "Richmond"
city = gets.chomp
city.capitalize!

print "California"
state = gets.chomp
state.upcase!

puts "Your name is #{first_name} #{last_name} and you're from #{city}, #{state}!" 

#I had to manually skip to the next lesson, then I run into the same problem on "Getting Input":

print "what's your first name?"
 first_name = gets.chomp

#changed to:

 print "Francisco"
 first_name = gets.chomp

#both examples get stuck when submitting


#2

first_name = gets.chomp

It expects for a input from the user(it's you).type something and then press enter


#3

Thanks for your help rcodeman. Will you give me an example of what you mean?


#4

Wooooh I figured it out, thanks rcodeman your help was enough to get me to try a bunch of ■■■■ and figure it out! which is how it should be :slight_smile:

for others, new input in bold

print "What's your first name?"
first_name = Francisco
first_name = gets.chomp.capitalize!

print "What's your last name?"
last_name = Vicente
last_name = gets.chomp.capitalize!

print "What city are you from?"
city = Richmond
city = gets.chomp.capitalize!

print "What state or province are you from?"
state = California
state = gets.chomp.upcase!

puts "Your name is #{first_name} #{last_name} and you're from #{city}, #{state}!"


#5

BUT i got this in the black box:

uninitialized constant Context::Francisco

whats that mean?

https://www.codecademy.com/en/courses/ruby-beginner-en-MxXx5/0/1?curriculum_id=5059f8619189a5000201fbcb


#6

Delete all the bold line

keep the code what it was before

now when you'll run your code you have to type something in the console.for example

print "What's your first name?"
first_name = gets.chomp
first_name.capitalize!
print first_name

If you run this code first you'll see it prints What's your first name? in the console.
so type your name and then press enter in the console.
the first_name variable will store the value what you'll type.
I added the last line of code to print the value of first_name .


#7

ohhhhh! thanks that makes total sense


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.