Comment

Comment by braindongle

If I'm teaching young'ns per se using a toy language, I'd reach for Scratch. It's history and Google's embrace of it seem like strong endorsements. Are there other good candidates in that space?

If I'm teaching an intro class using a general purpose language, it's Ruby or Python. My heart lies with Ruby, but having basic Python chops is such a bigger win downstream.

  for i in range(1, 101):
      if i % 15:
          print ('FizzBuzz')
      elif i % 3 == 0:
          print ('Fizz')
      elif i % 5 == 0:
          print ('Buzz')
      else:
          print (str(i))

  (1..100).each do |i|
    if i % 15 == 0
      puts 'FizzBuzz'
    elsif i % 3 == 0
      puts 'Fizz'
    elsif i % 5 == 0
      puts 'Buzz'
    else
      puts i
    end
  end
parent braindongle 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton