Another question - modulo


#1

puts "Do you prefer winter or summer (winter/summer)?"
response = gets.chomp
response = response.downcase

puts "How old are you?"
response = gets.chomp
response = response.downcase

valid = false
until valid == true

if response = "summer" && response >= "15"
	valid = true
	puts "You prefer summer and are 15 or older. "
elsif response = "summer" && response < "15"
	valid = true
	puts "You prefer summer and are younger than 15. "
elsif response = "winter" && response != response%0 && age > "10"
	valid = true
	puts "You prefer winter, your age is odd, and you are older than 10. "
elsif response = "winter" && response = response = response%0
	valid = true
	puts "You prefer winter and your age is even. "

end
end

I don't really understand how to do this part involving modulus:
elsif response = "winter" && response != response%0 && age > "10"
valid = true
puts "You prefer winter, your age is odd, and you are older than 10. "
elsif response = "winter" && response = response = response%0
valid = true
puts "You prefer winter and your age is even. "

So the instructions for this section is the following:
If you prefer winter, and if your age is odd, and if you are older than 10, say "You prefer winter, your age is odd, and you are older than 10". If your age is odd and you are 10 years or younger, say "You prefer winter, your age is odd, and you are 10 or younger". However, if you prefer winter and your age is even, say "You prefer winter and your age is even".

And can you please tell me if there's anything else wrong with my code?
Thanks for all your help!


What's wrong with my Ruby code? Please help :D
#2

What lesson is this? Please post a link. Thanks.


#3

Nevermind, but thanks for your help. I got the answer.


#4