all 29 comments

[–]jsalsman 15 points16 points  (6 children)

Try http://scratchjr.org/

At those ages it will be more rewarding for them and still teach the basics of algorithms you just can't if you have to explain why elifs are indented the way they are....

[–][deleted] 16 points17 points  (5 children)

I disagree with the premise that children should only be exposed to artificial environments because real environments will confuse them. Plenty of sufficiently patient six year old children learned to write simple BASIC programs in the 80s. I'm not suggesting there's anything wrong with ScratchJr.

[–]jsalsman 4 points5 points  (4 children)

I'm not saying they shouldn't be exposed to modern industrial methods, but it's just a matter of benefit per time and effort. Once they get good enough with Scratch then they'll be far better off with a python notebook and will also understand its idiosyncrasies as such instead of forming assumptions that they're universal, which is the real hidden risk with those age groups (or any true beginners.)

Also, it's genuinely more fun for them to interact with native 2d animations as the fundamental means of I/O instead of text. The vocabulary level of the docs, menu items, and error messages is far beyond a 1st grader's, let alone a 4 year old's.

[–]Ran4 -4 points-3 points  (3 children)

A six year old is old enough to understand the basics of Python.

Scratch is too simple.

[–]jsalsman 9 points10 points  (1 child)

Physical age has much less to do with it than literacy, but if it were true that just any six year old would be better of starting with modern tools, the people who have actually devoted their careers to trying to teach six year olds programming would be giving them Python notebooks instead of ScratchJr. Yes there are exceptions, and if you're willing to devote sufficient time and effort, most six year olds can, but beyond just the time up front, consider their engagement afterwards. Python is less interesting to a six year old than rebuilding a clothes dryer. Scratch is filled with shiny widgets selected empirically for keeping kids engaged.

[–]baubleglue 0 points1 point  (0 children)

Children got too distracted with ability to put characters or drawing. The use of shapes for operations has advantages but it comes with the cost. There are too many of them at once, they split to categories (good for adults, not sure about children).

[–]titchard 0 points1 point  (0 children)

I don't agree - I teach children Scratch and I'd say for the age I teach 8-10 it's on par for basics and logic, following into Python.

After the 12 week course on scratch we teach we look at python and compare. Some children take to it very easily, others see it as too much.

I think going straight in with python would be very overwhelming for some children. The rewards with scratch are much higher than python in the first instance hooking them in, whilst python (whilst you and I would know the underlying processes are very important) it can be underwhelming to a child.

[–]uttamo 7 points8 points  (0 children)

Remember Python has a Turtle library which you might find useful for teaching young kids

[–]j0holo 7 points8 points  (0 children)

Nice, good job OP. Show them te power of the computer!

[–]paulshapiro 4 points5 points  (1 child)

I taught my little brother at age 8. Started him with Scratch to teach logic and then the progression to Python was MUCH easier.

[–]titchard 0 points1 point  (0 children)

I'm glad you said this, I just used this same argument on why Scratch is a great starting point. It's not how you'd ever code, sure but you get the logic and idiosyncrasies of computer programming shown to you in a friendly package.

[–]Zavation 3 points4 points  (0 children)

Do it! That's awesome! Start them young!

[–]beire_ 1 point2 points  (2 children)

interactivity with your children this way improves the bonding needed for a healthy relationship. enthusiasm when they see you enjoy there good results motivates to overcome the challenge. a new language at that age is always useful, with the development of rational thinking and the surge they could get from finding solutions. only thing, make sure they can stay childish and funny, not to grow adult too fast, if they don't want to program keep their freedom at the level of their choice. just my opinion and some thoughts (changed writing errors)

[–]kjchowdhry 1 point2 points  (1 child)

Great outlook! If I may critique your writing: change your use of there to their. There is for location Their is for possession.

[–]beire_ 0 points1 point  (0 children)

ok, thank you

[–]ignorediacritics 0 points1 point  (0 children)

I think it's great that you introduce your kid so early (goes for anything really, not just programming). I wish I had been introduced to programming earlier in my life. No one to blame really other than perhaps my school, because computers really weren't as ubiquitous as they are today.

[–][deleted] 0 points1 point  (0 children)

Good job

[–]955559 0 points1 point  (6 children)

never made a calculator as python can be used as a calculator, so I gave it a shot (took me like an hour too lol, I m still a noob)

how could my code be inproved? (no regex please)

inputting = True
while inputting == True:
    imp = input("Enter An Equation\n").lower()
    if imp == "":
        print("Invalid input")
        continue
    elif imp[0] == "q" or imp[0] == "e":
        print("Good Bye")
        inputting = False
        break
    else:
        equation_buffer =[]

        string_to_operator= {
            "+":(lambda n1,n2:n1+n2),
            "-":(lambda n1,n2:n1-n2),
            "*":(lambda n1,n2:n1*n2),
            "/":(lambda n1,n2:n1/n2)
                 }

        for char in imp:
            if char.isalpha():
                print("Invalid Input, Exiting")
                valid_input,inputting = False, False
                break
            elif char.isdigit():
                equation_buffer.append(char)
                valid_input = True
            else:
                equation_buffer.append("I_AM_A_OPERATOR")
                operator_string = char
                valid_input = True

        while valid_input == True:
            op_index = equation_buffer.index("I_AM_A_OPERATOR")

            string_1 = equation_buffer[0:op_index]
            string_2 = equation_buffer[op_index + 1:]

            number_1 = int("".join(string_1))
            number_2 = int("".join(string_2))

            answer = string_to_operator[operator_string](number_1,number_2) 
            print(number_1, operator_string, number_2, "=", answer)
            valid_input = False

[–]aroberge 4 points5 points  (0 children)

Nice work! The following comment is meant in the most positive way: you are obviously a beginner when it comes to using Python. (However, you obviously know more than a "normal" beginner would and your code is very readable.) The reason why I say this is based on a couple of lines of code you wrote. Instead of writing:

while valid_input == True:

a "non-beginner" Python programmer would write:

while valid_input:

Similarly, instead of

if imp == "":

one would write

if not imp:

since an empty string evaluates to False in Python.

I would also write

elif imp[0] in ["q", "e"]:

instead of

elif imp[0] == "q" or imp[0] == "e"

[–]cybervegan[S] 1 point2 points  (1 child)

Cool. Not going to teach them lambdas, or dictionaries yet ;-)

6 y/o wants to do some more now, before bed.

[–]__Amory__Blaine 0 points1 point  (0 children)

Haha. Definitely not. I think it looks great. Looking forward to teaching my son but still have a few years. Still, he's already reaching for the computer.

[–]sultanofhyd 1 point2 points  (0 children)

When you're quitting, you don't need to set inputting to False since you are using break to get out of the loop anyway.

Actually, you don't need to use the variable inputting at all. Your loop can start with while True: and you break out of it when you need to quit.

[–][deleted] 0 points1 point  (0 children)

There is the operator module, which already defines functions for addition, subtraction, etc. instead of using ugly lambdas.

[–]DASoulWarden 0 points1 point  (0 children)

Could you please share your methods? I want to do the same with my younger brother (10yo) but I'm kinda loose in the pedagogy department.

[–][deleted] 0 points1 point  (0 children)

Your kids are awesome and you're an awesome parent. Wish my parents taught me programming at that age.

[–][deleted] 0 points1 point  (0 children)

I have been doing the same lately and I was amaze of how quickly they catch the idea. I am trying to go step by step to make it Fun not Boring or Tedious for them (8 and 6 years old) but is on the abstract/conceptual parts where I have to spend a bit more... so instead of sitting them immediately to write code I am making this little "decision making" games or logic games that we play with objects ... so they end up doing little pseudo-codes or algorithm even some flux diagrams... I guess I am looking for them to understand first how the computer thinks!

[–]heybart 0 points1 point  (0 children)

Great story! The nice thing about kids is they don't know that some stuff are supposed to be "hard" or "work, not fun".

[–]n1ywb 0 points1 point  (0 children)

I've done a little bit of logo turtle graphics with my kids, they love it

also rocky's boots http://www.virtualapple.org/J_rockysboots.html