Help, 4. repeat for more input


#1

print("What's your first name?")
first_name =gets.chomp
print(puts first_name)
print("last name ")
last_name = get.chomp
print(puts last_name)
print("ccity")
city = get.chomp
print(puts(city))
print puts("state")                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
state = get.chomp
print puts(state)

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


#2

Unlike Python 3, print is not a function and does not need parens.

print "What's your first name? "

puts is a print statement... put string. We do not print it.

puts first_name

#3

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