Putting the Form in Formatter capitalize



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

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

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}"


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

I suggest you look more in depth at the lesson.


Thanks i will. I think i got it now


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