Help, 4. repeat for more input


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)
city = get.chomp
print puts("state")                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
state = get.chomp
print puts(state)


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


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