Putting the Form in Formatter capitalize


#1



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

it just stops after the first answers. Thers no real hint aswel


print "What´s your name?" 
first_name = gets.chomp
first_name2= 


print "What´s your last name"
last_name.capitalize = gets.chomp
print = gets.chomp.capitalize

print "What´s your city"
city.capitalize = gets.chomp
print = gets.chomp

print "What´s your state"
state = gets.chomp
print = gets.chomp.capitalize

puts "your first name is  #{first_name}"
puts "your nast name is  #{last_name}"
puts "your city is  #{city}"
puts "your state is  #{state}"


#2

What's this print = ... stuff? The lesson and example clearly shows you how to do it. Once you set a variable, you can change that variable by adding .capitalize! to the end.

print "Test input."
input = gets.chomp
input.capitalize!

I suggest you look more in depth at the lesson.


#3

Thanks i will. I think i got it now


#4

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