Why do I need to type "Integer" here? I don't see how it relates to the rest of the code, but when it isn't there the code fails. I assume it must be some kind of pre-defined object but I'm hoping someone could enlighten me as to what and why it is.
user_num = Integer(gets.chomp)
print "Integer please: " user_num = Integer(gets.chomp) if user_num < 0 puts "You picked a negative integer!" elsif user_num > 0 puts "You picked a positive integer!" else puts "You picked zero!" end