turnbim 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

assignment_1 by turnbim

sum=0.0
count=ask"How many numbers do you want to average?"
count=count.to_i


count.times do
number=ask "Please enter the next number"
sum=sum+number.to_i
end
answer=sum/count


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