Noor 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

noor by Noor

result = ask "How many numbers would you like to average?"
alert result
result = result.to_i

count = 0
result2 = 0

result.times do
result1 = ask "Please enter the next number"
result2 = result2.to_i + result1.to_i
count += 1
end

alert result2

average = result2.to_f / result.to_f

alert "The average of the " + result.to_s + " numbers you entered is " + average.to_s