Python for Kids: A Playful Introduction to Programming

By Jason R. Briggs

For young ones elderly 10+ (And Their Parents)

The code during this ebook runs on virtually whatever: home windows, Mac, Linux, even an OLPC machine or Raspberry Pi!

Python is a robust, expressive programming language that is effortless to profit and enjoyable to take advantage of! yet books approximately studying to application in Python could be form of boring, grey, and dull, and that is no enjoyable for anyone.

Python for Kids brings Python to lifestyles and brings you (and your mom and dad) into the realm of programming. The ever-patient Jason R. Briggs will advisor you thru the fundamentals as you test with exact (and usually hilarious) instance courses that characteristic starving monsters, mystery brokers, thieving ravens, and extra. New phrases are outlined; code is coloured, dissected, and defined; and quirky, full-color illustrations preserve issues at the lighter side.

Chapters finish with programming puzzles designed to stretch your mind and improve your figuring out. via the top of the publication you should have programmed entire video games: a identical to the well-known Pong and "Mr. Stick guy Races for the Exit"—a platform online game with jumps, animation, and lots more and plenty more.

As you strike out in your programming experience, you will find out how to:

  • Use primary info constructions like lists, tuples, and maps
  • Organize and reuse your code with features and modules
  • Use keep watch over constructions like loops and conditional statements
  • Draw shapes and styles with Python's turtle module
  • Create video games, animations, and different graphical wonders with tkinter

Why should still severe adults have the entire enjoyable? Python for Kids is your price ticket into the superb global of desktop programming.

Show description

Preview of Python for Kids: A Playful Introduction to Programming PDF

Best Children books


This can be the 5th hilarious and touching novel from David Walliams: #1 bestseller and quickest turning out to be children's writer within the state.

Guys Read: Thriller

A physique at the tracksA teenage terroristA mysterious wish-granting machineThe world’s worst deepest detectiveThe moment quantity within the men learn Library of significant examining is brim-full of puzzle, intrigue, and nefarious task. that includes the very best writers round, and compiled via qualified man Jon Scieszka, men learn: mystery is a pulse-pounding selection of brand-new brief tales, each bound to retain you riveted till the ultimate web page.

Odd Girl Speaks Out: Girls Write about Bullies, Cliques, Popularity, and Jealousy

The nationwide bestseller bizarre lady Out uncovered a hidden tradition of cruelty that had constantly been quietly persisted by way of American women. As Rachel Simmons toured the rustic, those ladies chanced on their voices and spoke to her approximately their ache. They desired to talk-and they were not the one ones. moms, academics, counselors, younger expert ladies, even fathers, got here to Rachel with heart-wrenching own tales that can not be stored mystery.

Brian's Return

As thousands of readers of Hatchet, The River, and Brian's iciness recognize, Brian Robeson survived on my own within the desert through discovering strategies to impressive demanding situations. yet now that is he is again in civilization, he cannot have the ability to make feel of highschool existence. He feels disconnected, extra remoted than he did by myself within the North.

Extra info for Python for Kids: A Playful Introduction to Programming

Show sample text content

For instance, you'll create a Dueling Robots video game, the place robots circulate round a reveal and check out to assault one another. gamers of the sport would offer the directions for his or her robotic as mini Python courses. The Dueling Robots video game may learn in those scripts and use exec to run. The drift functionality The drift functionality converts a string or a host right into a floating element quantity, that's a host with a decimal position (also known as a true number). for instance, the quantity 10 is an integer (also referred to as an entire number), yet 10. zero, 10. 1, and 10. 253 are all floating element numbers (also known as floats). you could convert a string to a go with the flow just by calling glide, like this: >>> float('12') 12. zero you should use a decimal position in a string in addition: >>> float('123. 456789') 123. 456789 you may use flow to transform values entered into your software into right numbers, that's rather priceless for those who have to evaluate the price someone enters with different values. for instance, to envision even if a person’s age is above a undeniable quantity, shall we do that: >>> your_age = input('Enter your age: ') input your age: 20 >>> age = float(your_age) >>> if age > thirteen: print('You are %s years too outdated' % (age - 13)) you're 7. zero years too outdated The int functionality The int functionality converts a string or a host right into a entire quantity (or integer), which primarily implies that every thing after the decimal aspect is dropped. for instance, here’s how one can convert a floating-point quantity right into a undeniable integer: >>> int(123. 456) 123 this instance converts a string to an integer: >>> int('123') 123 yet try and convert a string containing a floating-point quantity into an integer, and also you get an mistakes message. for instance, right here we attempt to transform a string containing a floating-point quantity utilizing the int functionality: >>> int('123. 456') Traceback (most fresh name last): dossier "", line 1, in int('123. 456') ValueError: invalid literal for int() with base 10: '123. 456' As you will see that, the result's a ValueError message. The len functionality The len functionality returns the size of an item or, when it comes to a string, the variety of characters within the string. for instance, to get the size of this can be a try out string, you will do that: >>> len('this is a try out string') 21 while used with an inventory or a tuple, len returns the variety of goods in that checklist or tuple: >>> creature_list = ['unicorn', 'cyclops', 'fairy', 'elf', 'dragon', 'troll'] >>> print(len(creature_list)) 6 Used with a map, len additionally returns the variety of goods within the map: >>> enemies_map = {'Batman' : 'Joker', 'Superman' : 'Lex Luthor', 'Spiderman' : 'Green Goblin'} >>> print(len(enemies_map)) three The len functionality is very helpful whilst you’re operating with loops. for instance, shall we use it to reveal the index positions of the weather in a listing like this: >>> fruit = ['apple', 'banana', 'clementine', 'dragon fruit'] >>> size = len(fruit) >>> for x in range(0, length): print('the fruit at index %s is %s' % (x, fruit[x])) the fruit at index zero is apple the fruit at index 1 is banana the fruit at index 2 is clementine the fruit at index three is dragon fruit the following, we shop the size of the record within the variable size at , after which use that variable within the diversity functionality to create our loop at .

Download PDF sample

Rated 4.40 of 5 – based on 39 votes