Computer Coding for Kids
Format: PDF / Kindle (mobi) / ePub
A simple visual guide to get kids computer coding in no time
Computer coding is firmly back on the agenda as a key skill for children to start learning. Computer Coding for Kids is a unique step-by-step guide, perfect for kids interested in computer programming and how computers work. Now available with text that lights up as you read along and playful images and sounds.
Avoiding computer jargon, this book guides children through creating computer programs starting with the very basics. Computer Coding for Kids is the only programming book that teaches both Scratch and Python programming languages, with illustrated, simple, step-by-step explanations that make the complex art of computer programming clear for the complete beginner. Starting with simple explanations of programming basics, it progresses to more advanced projects where children can build their own games.
Computer Coding for Kids is ideal for kids looking to take your first steps into programming or those that are already interested and hungry to learn more.
your string? Starts at index 0 ‘MINGO’ Ends at index 7 >>> print(‘It\’s a cloudy day.’) It’s a cloudy day. The apostrophe is included in the string △ Escaping the apostrophe So Python doesn’t read an apostrophe as the end of the string, type a “\” before it. This is called “escaping” it. 116 P L AY I N G W I T H P Y T H O N Input and output SEE ALSO Programs interact with users through input and output. Information can be input into a program using a keyboard. Output is shown as
“immutable”. print(‘Hello’, item) Hello Simon The body of the loop must be indented by four spaces Hello Kate When run, this program displays “Hello”, followed by each name on the list Hello Vanya x = [1, 2, 3, 4] Remember, lists are contained within square brackets y = [5, 6, 7, 8] z = x + y The new list contains everything from list “x” followed by everything from list “y” This adds the lists together print(z) z = [1, 2, 3, 4, 5, 6, 7, 8] ◁ Lists in loops You can use a loop to work
int(typed) a + b = 17 return num Returns the value stored in the variable a = num_input(‘Enter a’) b = num_input(‘Enter b’) print(‘a + b =’, a + b) This converts the string into a number and stores it in the variable “num” Adding “a + b” outputs “17” because the function “num_input” gives back numbers, not strings 132 P L AY I N G W I T H P Y T H O N PROJECT 5 Silly sentences SEE ALSO Loops, functions, and lists can be used individually for lots of different tasks. They can also
into a list of smaller strings. Each break point is marked by a special character ( “-” in this program). This string lists the commands to create the sample house shape >>> program = ‘N-L90-F100-R45-F70-R90-F70-R45-F100-R90-F100’ >>> cmd_list = program.split(‘-’) The “split()” function breaks the string down into a list of separate commands >>> cmd_list [‘N’, ‘L90’, ‘F100’, ‘R45’, ‘F70’, ‘R90’, ‘F70’, ‘R45’, ‘F100’, ‘R90’, ‘F100’] 7 Now write out the pseudocode for the String artist using
computers solve complex calculations when all they understand is electrical signals? Binary numbers are used to translate these signals into numbers. What is a base number? A “base” is the number of values that can be shown using only one digit. Each extra digit increases the number of values that can be shown by a multiple of the base. ▷ Decimal system The decimal system is the most familiar counting system, and has a base of 10. It can show 10 values with one digit, 100 values with two digits,