Author Topic: Programming with the kids  (Read 7187 times)

Dragon

  • Administrator
  • Platinum Level
  • *****
  • Posts: 4862
  • Have you played my board game?
    • Rival Troops
Programming with the kids
« on: January 14, 2017, 16:30:42 »
My oldest kids have started programming in Python at school. I think it's really cool. I was showing some stuff to my daughter and had suggested using rainbow colors for a circle. (Originally, I she was drawing multiple circles, with different colors for each one, but the words came out a little different as I was leaving the room.) My son took up the challenge though and came up with this... which I just had to show off...

Attached is a screenshot of the end result... he said it's not perfect, but I told him he can update it, but this was great. (This was done on repl.it.) I'm going to challenge my kids some more with this...

Code: [Select]
import turtle

t = turtle.Turtle()
t.speed(100)

for i in range(11):
  t.pencolor('red')
  t.forward(10)
  t.right(5)
for i in range(11):
  t.pencolor('orange')
  t.forward(10)
  t.right(5)
for i in range(11):
  t.pencolor('yellow')
  t.forward(10)
  t.right(5)
for i in range(11):
  t.pencolor('green')
  t.forward(10)
  t.right(5)
for i in range(10):
  t.pencolor('blue')
  t.forward(10)
  t.right(5)
for i in range(11):
  t.pencolor('purple')
  t.forward(10)
  t.right(5)
for i in range(10):
  t.pencolor('pink')
  t.forward(10)
  t.right(5) 
« Last Edit: July 15, 2021, 16:30:04 by Dragon »
"Hello IT. Have you tried turning it off and on again? ... OK, well, the button on the side. Is it glowing?... Yeah, you need to turn it on. Err, the button turns it on. Yeah, you do know how a button works, don't you? No, not on clothes." - Roy (The IT Crowd)

Dragon

  • Administrator
  • Platinum Level
  • *****
  • Posts: 4862
  • Have you played my board game?
    • Rival Troops
Re: Programming with the kids
« Reply #1 on: February 27, 2018, 18:49:49 »
I figured I'd update this thread since it was the first one that I found when I was looking for a link to recommend. Here are some sites that you might want to check out if you or your kids are interested in programming.

codecombat.com - This is a great place to start! It's has a fun interactive adventure game that you get to write code in.
codecademy.com - After codecombat.com, you might want to check out some more languages at codecademy.
codingame.com - This one is my favorite place to exercise, but you'd need to have some of the basics down already for this site.
code.org - Maybe the most publicly known due to campaigns to teach programming, this is an interesting one that I've tried and recommend, but I haven't done much on it myself.


By the way, http://resizeimage.net/ is a great place to adjust your images to upload here. Try 600x400px size to stay under the 512KB limit.
« Last Edit: February 07, 2021, 13:48:56 by Dragon »
"Hello IT. Have you tried turning it off and on again? ... OK, well, the button on the side. Is it glowing?... Yeah, you need to turn it on. Err, the button turns it on. Yeah, you do know how a button works, don't you? No, not on clothes." - Roy (The IT Crowd)