Open In Colab

Introduction to Being a Python Shinobi

What is a Python Shinobi?

alt text

A python shinobi are kids who knows how to code using python.

alt text

Coding for Kids: Python is a unique and fun introduction to the Python programming language. Written for someone with absolutely no experience with coding, this book uses silly analogies, helpful examples, and many activities and games to help anyone learn how to code in Python!

Code is at the core of almost everything we use and love. We can write code to make games, create music and art, bring robots to life, and power almost anything that is electronic. When you realize how much coding is a part of the world of the future, it becomes so important to learn how it works!

Coding is literally translating human ideas and actions into a language that computers can understand. Python is one of the languages, but there are many others—for example: JavaScript, C#, Ruby, and C++. Each of these languages tells the computer how to do something, but each one does it a bit differently. I chose Python for this book because it is very close to our speaking language of English, which makes the coding concepts I will introduce a little easier to understand. :)

Coding is one skill that you’ll only learn by doing. That’s why I’ve structured each chapter to walk you through the code as you follow along. This makes the book truly interactive, as you’ll learn about a concept, write some code, understand what it’s doing, read and learn a bit more, maybe fix a bug or two, and see the results of your code in real time! And to really help you understand the different coding concepts in this book, I’ve also included activities at the end of each chapter to help you test your knowledge, combine multiple concepts, and write more code. After all, practice makes perfect—especially with coding! Finally, if some of the activities are too easy for you, or if you just want to keep coding, I’ve included even more difficult challenges after each chapter to really stretch your brain and give you more chances to show off your creativity!

This notebook will help you start an incredible adventure into the world of programming. By the end of it, you’ll be ready for the world of the future! What are you waiting for?

  • Genin.

  • Chuunin.

  • Jounin.

  • Special Jounin.

  • Kage.

Welcome to Python

Hey there! Since you’re reading this book, you must be a pretty curious and cool person.


*Why? *

Because you want to learn how to code! And who wouldn’t? Coding is an awesome skill that can help you build all kinds of things and solve a lot of problems. When you code, you take human ideas and then translate them into a language that a machine can understand.

Coding is built around the concept of input and output. We give the computer some input , which is any information or data provided by us humans, and expect some output , which can be words, pictures, an action, or some other result, after the computer has processed the input we gave it. Sounds interesting, doesn’t it?


How many things can you think of that follow this input/output, or I/O , concept? For example, when we press buttons on a controller or swipe our fingers left and right on a mobile game, that’s input. And when our character jumps, ducks, moves left, or moves right, that’s output. How about baking? All of the ingredients we need to make cookies can be considered input. After following the instructions and using the ingredients, we get our output, which are the baked cookies!

Using examples like these, as well as silly scenarios and conversations with a computer, we’ll explore how to code in Python, and you’ll understand what we’re doing in no time! The coolest thing about coding is that you can do it from almost anywhere. All you need is a laptop or computer (Windows PC or Mac is fine), and I’ll help you with the rest.

Are you ready to learn how to speak to a computer? Hooray! Let’s go!

welcome to pythn

Just like humans can understand many different languages, a computer can understand the ideas and concepts that we input to it through several different programming languages. In this book, we’ll focus on the Python programming language because Python is easy to understand, can be used in many different ways, and is quick to learn. Also, it is a popular language that runs on almost every machine and is used at many big, important organizations like Google, Instagram, NASA, and Spotify.




alt text

NOT… We do the ninja way … we want to dive right into coding




Since we are using notebook we will be using google colab.

Google colab will help us to run codes in python in the cloud google colab

How to use Google Colab

Just use your google account to open.

Google Colab has two type of cell

  • Code Cell and Text Cell

  1. Code Cell - this where you type your code and just click on play button to run your code (Easy) Code cell

  2. Text Cell -this is where you write things. anything you want to say about your code or something (just like I am doing right now) text cell

Say Hi to Google Colab


Now that you meet google colab, it is always polite to say Hi.
in the code cell below, Go ahead and type the followiing code

Hello

Now run your first JUTSU or code by clicking on the play button where it is mark red.


Do see something like this?
Run Hello
Great job! You’ve written your first line of Python code! Give yourself a pat on the back, or high-five the person closest to you. You’re about to learn some awesome things.
congrats