top of page
IMG_20170503_173438.jpg

Post

How to start coding with Python in 5 minutes






Introduction



Your kids are growing and entering the teenage era. They also have a passion for STEM, like tinkering things around and want to move to the next level (coding, I mean real coding, not just only blocks) but do not know how to start. It may seem hard because coding is a new environment and that you don't know all the languages, syntaxes and codes.


It's true that if your child doesn't have good advice at the beginning and while in the learning process, it may make it harder for them. They might become uninterested and decide to stop. And this is not what we want.



Where there is a will, there is a way. Some coding languages are dull. When somebody tells you to learn something new, like a new skill or a new language for work, it may scare some of us since we are leaving our comfort zone. That's the same with the kids unless they are well guided, make it entertaining, have them reaching a goal during the process and so on.



The benefits you can share with them are:

  • They can create a video game with it

  • Impress their friends

  • Make and code their own toys (by crafting them with electronics and 3D printing and code them thereafter).

  • Use it later when they will be older to control computers ( Each of us want to be a good hacker inside and they are no exception. Lol)





Where there is a will, there is a way.Some languages are still efficient even in the industrial world and are still understandable and reachable but the teens. Yes!!!


How to start coding with python in 5 minutes?



The first thing you usually need is installing a software environment so you can code. But we are talking about a really usable and reachable language. So here comes Python coding.





It's a language used worldwide which is easier to use because of the syntax used. It makes it much simpler compared to other coding languages such as C#, C, Java, etc.


To get started go to "python.org/shell" and you'll see that black window called a shell. It allows you to write your code in it. Start typing arithmetic numbers in it. And you will have results like a calculator.





Type print("My name is Mike") and you should see what you typed between the quotes,





You can used variables as well. It allows you to stock data like a container. Let's say you want to save your age. You name the variable "age", so you can remember it and you give it the value 37 (Whatever age you want actually).





  • Age = 37


You can now use print to display the value stored in "age".

  • Print(age)

  • Result : 37

That's a good way to start. ;-)




Mistakes with python coding


We can use python for arithmetic (+, -, * , / ). Be careful to not divided by zero. We may have an error coming back.

When displaying a variable in print, do not put quotes around the variable. It may return an error.


Do not do that:

  • "age"=37

  • print("age")

It will return "age" and not "37" which is the value stored inside.



Example of mistakes


In the following example, it will print "age" for you and not the value stocked inside age. Because we put the quotes





In this example, it will print an error and not "1" because we wrote "carr" with two "rr" instead of car with one "r''.




What to do next


You have discover the power of python with installing any software and working online. You can try arithmetic or even try a bit more with the variable. You can find diverse python exercises online by just type "python coding exercises". To specify what type of exercises you add "python variable exercises".



Free online classes


If you have any questions on this topic, send me an email at the following : contact@makersgeneration.net


Classes will be available for free on Saturdays at that same time to introduce your children to STEM in different topics ( Coding, Robotics, 3d modeling, smartphone app creation, electronics..).


Thank you for joining the classes with your kids. Consider to subscribe to the newsletter if you want to stay up to date to our weekly tips, videos, articles for parents and tutorials. It can be found at the bottom of the website ( www.makersgeneration.net).

You can also see weekly activities on our social media by subscribing: Facebook, Twitter, Instagram and youtube.


Do not hesitate to contact me with the above email for suggestions, classes or just exchange.

I look forward to hearing from you.

Talk to you soon,





Categories

Recent Posts

Archive

Search By Tags

Follow Us

Comments

Share Your ThoughtsBe the first to write a comment.
bottom of page