Coding for Kids Ages 9-15
Basic html, css and JavaScript from Scratch
Table of Contents
Disclaimer
Introduction
What Not To Do
First Steps to Get Started
SET UP WORKSPACE
What You Need
Download and Install Notepad++
How to Start using NotePad++
Test Program
Result:
Intro to html
What is html?
Example of a html tag
Basic html tags and What Theyre Used For
Html example:
Heres What We Get as An Output
Exercises to Practice
The Bulb Example - html
What This Project Does
Concepts to Understand for this Chapter
Files
Code
Output
Exercises to Practice:
html Forms
What are html forms?
Form Html Tag format
Different parts of form html tag
JavaScript Example
What is JavaScript?
How to Use JavaScript in html
JavaScript Terms You Need to Know
JavaScript Example 1
Breaking down the code:
JavaScript Example 2
Exercises to Practice
Conditional Statement
What is the conditional statement?
IF ELSE Loop Example 1
Breaking down the code:
IF ELSE Loop Example 2
Breaking down the code:
Exercises to Practice
Nested Conditional Statements
NESTED IF ELSE LOOP EXAMPLE
Exercises to Practice
Loops
Example #1
Example #2
Example #3
Exercises to Practice:
Arrays
Example 1
Example 2
Exercises to Practice
Having Fun with Strings
Strings and String Variables
Finding Length of a String
Splitting Strings
Replacing Strings
Substrings and String Index
Exercises to Practice:
Introduction to CSS
What is CSS?
How to Use CSS in a html website
CSS Terms
CSS Example
Exercises to Practice:
Linking Multiple Web Pages
Exercises to Practice:
Math Functions
Conclusion
Disclaimer
Copyright 2020
All Rights Reserved
No part of this eBook can be transmitted or reproduced in any form including print, electronic, photocopying, scanning, mechanical or recording without prior written permission from the author.
While the author has taken utmost efforts to ensure the accuracy of the written content, all readers are advised to follow information mentioned herein at their own risk. The author cannot be held responsible for any personal or commercial damage caused by information. All readers are encouraged to seek professional advice when needed.
Introduction
It was a bright summer afternoon in Atlanta; and I grabbed my laptop to watch the latest episode of Game of Thrones on the porch outside. As I sat on the three-legged chair; I felt a wobble on the rear leg. The leg just came off the stool and I crashed to the ground on my back. Hearing the loud thud on the porch, both my wife, Isabelle, and son, Arnad, came out. Are you ok? Isabelle gasped. I was shaken, but fine, as Isabelle helped me up. I walked inside and grabbed a glass of water to get me back to my senses. To my amazement, I noticed, through the window, my 9-year-old son, Arnad try to figure out how to piece it together. He assembled the leg back in and noticed that the chair was still wobbling. He then switched out the screw with the one on the good leg; and the chair was still wobbling. He finally glued the sliding mechanism that held the screw in place; and that magically fixed the chair. Wow!!
Next, we can talk about Betty. Our neighbours daughter, Betty, struggled with Social Sciences for the longest time. Her parents were used to failing grades in this topic; and were relieved each time she got a D. So, imagine their shock when Betty came back one day with a report card that showed an A in social science. Yeah, Betty was a hardworking girl and she did do well in some of her subjects; but this turnaround was unexpected. Then, Betty showed her parents her social science improvement plan in the last three months. She broke down the list of topics she would work on every week; and how she would simplify some of the harder topics with documentaries and group study sessions. She systematically moved on from topic to topic till she addressed all of them.
And finally, we address Carl. Carl was a tennis player at the start of high school. He was a lot smaller and weaker than his opponents. As a result, he lost pretty badly in his first tournament. He struggled to even get a few points. While he was upset, he realized that his loss was not a loss due to lack of skill; it was based of circumstances. He analysed the situation; and realized that he needed to improve his skill and positional play on the court. He analysed the movement of his opponents on the court; and adapted his shots to always make sure they played him off balance. He did plenty of yoga and other stretching exercises to improve his flexibility, balance and speed. He started improving month after month. Every month, he practiced a different shot. In a couple of years, he grew into his frame and was much stronger and wider. And due to his hard work, he was much more skilled than his opponents. In his third year of high school, he won the annual tournament with really no competition at all.
All of these situations are hypothetical and can happen due to innate characteristics of certain kids. Also, coding does not guarantee that you will learn these skills. But, all of these situations demonstrate skills that can be learnt during coding. Arnad systematically examined the chair and its different components; and worked through each component to find the problem. This is the same as a process called debugging in programming. Debugging is what happens when a program doesnt work. It requires systematic analysis of the code to find the problem and make it work.
Betty looked at a problem; and organized it into different parts that are required to achieve a result. This is similar to problem solving in programming. This is understanding what is required to solve a coding problem; and structure the code into different sections to make the program work.
Carl is doing the same thing as Betty; he is structuring a problem into different parts so it can be solved in a simple manner. But, in addition, he is prioritizing different skills on the tennis court. He spent time figuring out which skills are more important to beating his opponent and worked on those first. Prioritization is an important skill in programming after a code is properly structured. Coders want to prioritize more vital tasks in the code to test first.
All these skills are vital to programming; and your kids should learn these if they learn how to code well. It doesnt really matter if they become programmers. The skills will benefit your kids for life. Programming also helps kids improve at basic math and reading; in addition to better logic and problem-solving skills.
These skills, combined with communication skills they learn in high school, are the reason why software engineers are paid a median annual salary of $112000 (as of 2018) in America. This is over double the average salary in America.
Despite this, high schools all over the world, even in affluent areas, lack the staff and technical resources to handle this task. According to a 2000 K-12 teacher survey done by Tech Republic, only 8% of teachers felt reasonably confident to teach children programming. 50% of kids in America do not have access to the internet at home. The statistics are even worse for girls and children of color in America; who have less resources and role models to look up to.
Next page