0
Ruby help
Ok, so I’m currently working on a project with ruby right now. I need help on one part though... so I’m making it a user input thing and when someone puts in the correct input I want to to print something does anyone know how to do that?
3 Antworten
+ 1
Diego alright, thanks
+ 1
oh i see what i did wrong... i did “=“ instead of “==“
0
name = gets.chomp
if name == "Ethan"
puts "Correct"
else
puts "Wrong"
end
Input: Ethan
Output: Correct
Input: James
Output: Wrong