Often kids will ask me, "I want to be a hacker, what programming language should I learn?" , or some kids will say, "I want to learn C, I want to do viruses." In fact, for these kids they basically have not been exposed to programming languages, but only through movies and TV or some other places to see some things that think hackers are cool, super awesome, and therefore also developed this idea. I also think that hackers are awesome, they don't just know a programming language, there is still a long way to go for kids to become as awesome as them.
And what many kids really want to do is to be able to make cool stuff with simple code, and be able to show it off among their classmates, that would be satisfying. If you really want to learn programming, then I still suggest python, see these amazing codes below, maybe you will change your initial idea. It's not that we think C is bad (many people start from c and are intimidated, frustrated and give up from then on), but python is more suitable for starting, when you learn through a period of time, you really love programming, you can go back to learn c, so that the knowledge you have accumulated before will give you a deeper understanding and knowledge of it, after all, interest is really important.
If you can show this line of code in front of your classmates and friends, I'm guessing they'll look at you with special admiration.
print'\n'.join([''.join([('ChinaLove'[(x-y)%8]if((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3<=0 else' ')for x in range(-30,30)])for y in range(15,-15,-1)])
Executing it in python outputs a heart spelled out in characters, isn't that cool.
One more, though you may not know about this one, but it's exciting to see how it turns out.
There is a famous image called the mandelbrot. each position in the mandelbrot image corresponds to a complex number in the formula N = x + y * i, which should still ring a bell to anyone who has studied complex numbers in high school. Each position is represented by the parameter N, which is the square root of x*x+y*y. If this value is greater than or equal to 2, the value of the position corresponding to this number is 0. If the value of the parameter N is less than 2, change the value of N to N*N-N (N = (x*x - y*y - x) + (2*x*y - y) * i)) and test this new value of N again. wiki wikipedia gives an image like this:
Let's draw a Mandelbrot with one line of code:
print'\n'.join([''.join(['*'if abs((lambda a:lambda z,c,n:a(a,z,c,n))(lambda s,z,c,n:z if n==0else s(s,z*z+c,c,n-1))(0,0.02*x+0.05j*y,40))<2 else' 'for x in range(-80,20)])for y in range(-20,20)])
11111
For on-the-go gadgets, it's more of a Python specialty.
One line of code prints the multiplication table.
print '\n'.join([' '.join(['%s*%s=%-2s' % (y,x,x*y) for y in range(1,x+1)]) for x in range(1,10)])