darokel
and many others are using
Hackety Hack
to learn how to code.
Hackety Hack is a free program for Windows, Mac OS X and Linux that can teach you how to make games, applications and more and share those programs with your friends. You can ask other budding programmers questions and follow them to see what code they're working on through the Hackety Hack website.
Sign up
Learn More
puts "What is your name?"
name = gets.chomp
if name == "Andy"
puts "Hi Andy! Thanks for checking out my programme!"
puts "Andy, are you ready to start the game?"
response = gets.chomp
if response == "yes"
puts "Great, let's begin! For a $1000000, can you tell me what 100*20 is?"
response_two = gets.chomp
if response_two == "2000"
puts "Well done, you're rich!"
else
puts "YOU LOSE!!"
end
else
puts "Ok no problem, come back another time!"
end
else
puts "Hi ," name.capitalize + ", Thanks for checking out my programme!"
end