How to code

This book teaches you how to code

Before you start:
If you can’t install python use Colab.

www.colab.research.google.com

You can’t use GUIs, web servers (Flask), or SQL Servers (see SQL Time) on Colab though, . You can run Linux commands like pip or apt-get by starting them with an !. So like !pip install package.

You can start a python website using Flask by using PythonAnywhere

www.pythonanywhere.com

Then create a free account and click on create a new web app.

You can’t use GUIs or SQL Servers (see SQL Time) on PythonAnywhere though.

Google is the most helpful resource. If you have an issue, Google it.

www.google.com

Stack Overflow is another helpful resource. It is a large forum with lots of info. You don’t have to create an account to read it. However to post and ask questions, you’ll need an account.

https://www.stackoverflow.com

First steps

Downloading Python

(May be different on Mac)

Go to www.python.org then go-to downloads then to Download Python

Then select the installer that was downloaded

Then select both check marks at the bottom of the installer

Then select Next

Then select Disable MAX-PATH-LIMIT

Then enter your admin password if prompted
Then select Yes

Then wait


Hello Python

How to make hello Python!:

Note: If you’re on a Mac or Linux at the beginning type this #!/usr/bin/python3. This is called a she-bang. It tells what to run it with.
Open Python in the start menu

Press Ctrl+N

Type print(“hello Python!”)

Press run then run program!

You have made your first program!

Parrot

Welcome to your second program

Make a new file (Ctrl+N)

Variables: type the name of the variable and = then information to store to store information. Example: a = “hello world”. Then typing print(a) will output hello world

Inputs: ask the user something. Example: input(“What is your name?”) will ask the user to type something

So first thing, we need to use assign Inputs to a variable.

Answer: a=input(“Type something: “)

Next, we need to print a

Answer: print(a)

Next we need to create a loop. Loops are what they sound like. Loops make something happen over and over again.

Loop: Makes something happen over and over again.

Example: while True: then a new line then type what you want to be repeated. To end the loop type break. To make something happen outside the loop hit Backspace and then type.

Let’s review what you have typed so far:

a=input(“Type something: “)

print(a)

Now let’s run it. It should output (brackets are not displayed and are placeholders):

Type something: (now you type something)

(what you just typed)

Now let’s add the final parts:

At the top type while True: and select the rest of the code. Now press Ctrl+{

Now run it!

The code should go on until you close it.

Great Job! You made your first program!

You may have noticed that the text above is green. That is an Award that shows you’re progressing!

Here is your progress:

You made your first program!

Welcome To The Internet

Data

???

Connect To The Internet

For this example we will use CodeCloud. CodeCloud is a network integration service that allows you to make your programs link to the internet. Your CodeCloud link is www.graffbt.com/codecloud/howtocode/code/write.php. This link let’s your programs access the internet. Store your link in a variable like so codecloud = “www.graffbt.com/codecloud/howtocode/code/write.php'' . Now you need to download the codecloud module. First, we recommend using SPM. To download SPM you need to go to devolper.graffbt.com/downloads/spm. Now click the SPM for Windows Button and run the installer that downloads. Setup SPM by surfing through the installer. Now run SPM. Then type codecloud into the search and search it. The program will download codecloud into the selected directory. Now go to your python program and type from codecloud import readfile, write. Now type print(readfile(“www.graffbt.com/codecloud/howtocode/unpkgs.txt”)).

You should see the following output:

Hello

World

Now type cloudwrite(codecloud, “hello”)

You have accessed the Internet!

You earned Welcome to the Internet!

Your progress:

You made your first program!

Welcome to the Internet!

Data

More Data

???

Lists

This lesson is very quick. Let’s learn how to work with lists.

Creating Lists

Alright, Lists are important. So it’s time to learn about them.

To make a list, you type something like this:

#We need to add the underscore at the beginning because list and tuple are reserved

_list = [“Some”, 1, “Cool”, [“Looking”, “Values”]]

Any object can go into a list.

To add to a list type the following:

#l is the list

l.append(object_to_add)

To remove:

#l is the list

l.remove(object_to_remove)

Tuples

The same as lists but you can’t change them. They are immutable. So like this:

L = (“Your”, 1, “tuple”)

Just like lists any object can be added to it.

Dictionaries

These are complicated. A word dictionary in Python would like like this.

d = {“Apple”: “A tasty food”, “Cake”: “Same as apple”}

GBT Programmer’s Manual says

#Syntax: {“Value”: “Key”}

#Accessing dictionary[value] returns/says key

So typing this:

print(d[“Apple”])

Will output this:

A tasty food

So see if you can make a phone book that will do the following:

Enter a name: (the name of a person)

(the phone number of that person)

Here is the answer:

dictionary = {“Person”, “(123)-4567-890”, “Person2”, “(234)-5678-900”}

name = input(“Enter a name:”)

print(dictionary[name])

Your earned Data

Your progress:

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or no?
???

Working with Data

Functions

In order to understand the next step, we need to know functions

Defining

To define a function do this

#Define it

def myfunction(arguments):

        print(“You called on the function”)

        print(“Your argument was”.join(arguments))

Call it

#call on it

myfunction(“this is an argument”)

Classes

Let’s get to the (most amazing) most challenging data type. Classes. It lets you make your own data types.

To make one:

class myclass(object):

def __init__(self, arguments):

        self.var1 = “String”

self.argument = arguments

class self.myclass(object):

        def __init__(self):

                self.elipsis = [...]

        

def func(self):

        print(self.arguments)

To access it:

#Create an “instance” of the class

instance = myclass(“Hi there”)

#Access the list

print(instance.argument)

print(instance.var1)

instance.func()

Instance2 = instance.myclass()

You have earned More Data

Your progress:

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or no?
SQL Time

???

On or Off?

Check this snippet of code:

#Check if something was received

if server.receivedtf() == True:

        print(“On”)

else:

        print(“Off”)

In English this is:

If something was received from the server, say ‘On’. Otherwise, say ‘Off’.

So…

Try to make a text adventure based off this snippet. You must use classes, lists and if statements:

#Create a player class

name = input(“Enter your name: “) 

#Make an instance of it

p1 = input(“You are in a room. You see a small ball. Pick it up (y/n): ”)

if p1 == “y”:

        print(“Hello ” + player.name() + “. Welcome to the Infinite World”)

        #Continue…

You have earned Yes or No?

Your progress:

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

???

Programming inside of a Programming Language

SQL powers businesses around the world. They need servers to use it. Guess who can code a server? You! So let’s learn how to build a server using a Raspberry Pi (or creating a server software which we will show you how to do).

What you’ll need:

Raspberry Pi

A computer to access the Raspberry Pi from

Python Skills

MicroSD card (at least 16GB)

A phone charger

An adapter to connect the MicroSD card to your PC

A monitor

A keyboard

A mouse

To get the SD card setup:

First goto raspberypi.org/downloads

Next find NOOBS (New and Out Of Box Software)

Next click download zip

Next wait 10-30 minutes to download

Next download balenaEtcher (search it on the internet)

Next connect the microSD card to your computer

Next use balenaEtcher to flash the .zip file that you downloaded.

Next eject the microSD card

To get the Raspberry Pi setup:

Insert the SD card into the slot on the bottom

Connect the HDMI cable to a TV

Connect the microUSB phone charger to your Raspberry Pi

Turn on the TV

Set the input to the HDMI cable

Connect a keyboard and mouse

Select Raspbian Desktop with Recommended Software

Wait 10-30 minutes

Wait for it to reboot

Open the Terminal (That icon with the window and the >_)

On another computer:

Search How to setup samba on Raspberry Pi

Run the commands on whatever instruction set you find in that Terminal window on your Raspberry Pi

On a windows PC:

Go to This PC in File Explorer

Go to Map Network Drive

Type in \\raspberrypi

For the username type in pi (unless you changed it)

For the password type raspberry (unless you changed it)

Click OK

You have signed into a server

Unless you changed it your new drive is Z:

On a Mac

Go to Finder

Go to Go

Go to Connect to Server

Type smb://raspberrypi

The username is pi (unless you changed it)

The password is raspberry (unless you changed it)

Unfortunately, Mac OS it a little harder to code

Let’s start with coding for windows

First install sqlite:

Goto the Start Menu

Type pip install sqlite

Hit enter

Then after the black window closes do this:
Goto the Start Menu

Type pip install sqlite3

Hit enter

Next in a new program type this code:

import sqlite3

ftw = open(“database.db”, “r”)

ftw.close()

database = sqlite3.connect(“database.db”)

cursor = database.cursor()

cursor.run(“CREATE TABLE HELLO( PRIMARY KEY H, E VARCHAR, L VARCHAR, L2 VARCHAR, O VARCHAR);”)

cursor.run(“INSERT INTO HELLO (“HI”, “THIS”, IS”, “AN”, “SQL DATABASE”);”)

database.commit()

Now go to your database.db file and check if it has things in it. If it’s empty, double check your code.

Now go to your server and drag your program and database

Next on your computer create a program and call it control_netbase.py

Now inside it put the following:

        cr = open(“Z:/database.db”, “r”)

        cr.close()

        print(“Opening NetBase Connection”)

        database = sqlite3.connect(“database.db”)

        cursor = database.cursor()

        while True:

                cmd = input(“NetBaseServer/Databases/database.db>”)

                if cmd == “commitchange”:

                        break

                cursor.run(cmd)

        database.commit()

Now run it.

You should see NetBaseServer/Databases/database.db>

Type an SQL Command (google sql commands).

If you want an idea, make up a fake company then create a list of employee IDs, birthdays, and names and then try this one:
CREATE TABLE EMPLOYEES( PRIMARY KEY ID, BIRTHDAY VARCHAR, NAME VARCHAR);

Then do:

INSERT INTO EMPLOYEES(  (id), (birthday), (name) );

Finally commit the changes with:
commitchange

You have earned SQL Time

Your progress:

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

???

Combine it all

This is the finale of this chapter (*gulp*)

How do you “Combine all this”?

Well use the Internet, Data, If statements, SQL to create a text adventure

After you are done…

You

Have

Earned

Combine it all

The finale of the chapter

Your progress:

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

???

Chapter 2 Beginning: Install and Import

Let’s install a basic module. Numpy.

What is Numpy?

Well it’s simple, powerful operations with numbers.

Installing Numpy (and any other modules)

GBT Programmer’s manual says:
To install a module use pip:

pip install <module>

So to do install numpy goto the Command Prompt (on windows type pip install numpy in the Start Search) and type pip(pip3 on Mac/Linux) install numpy.


Now, you may have noticed that you did this in the last chapter with SQL and SQLite3. Now let’s get to numpy. Try this:

import numpy

array = numpy.array([[0,0],[0,1],[0,2]], numpy.int32)

This is an array. An array is a 2-dimensional list. They have powerful functions that are very helpful in your code.

Next you will need to create a new program called guis.py and in it put this:

import tkinter as tk

#the ‘as’ part of the last line makes tkinter = tk

   

root=tk.Tk()

button = to.Button(root,text=”I am a button”)

root.mainloop()

Save and close the file.

You have earned Install and Import

Your progress:

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

???

Build A GUI

Let’s build a GUI. You may have many questions. First on this list is, what on earth is a GUI? Well, a GUI is a Graphical User Interface. So most apps you see today. Next on this FAQ is, how do I make one? Well it goes it steps. Here they are:

  1. Build a Tree (See image)2. Code it (see snippet):

                import tkinter as tk

                root = tk.Tk()

                def launch():
                        #add your code from the combine it all in the last chapter here

                close = tk.Button(root, text = “Close”, command=exit)

                play = tk.Button(root, text = “Play”, command=launch)

                close.pack()

                play.pack()

                root.mainloop()

        3. Test it

Well, how did it go? You can see 2 things about the code.

  1. Pressing the close button exits the app
  2. Pressing the play button launches your text adventure

You have earned Go Graphical!

Your progress:

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

???

Make a “standalone app” with pyinstaller

Now, you’re building amazing apps with Python. However, there is one problem. You need Python to run these apps. Now, you can install tools using pip. So lets install one that lets you make apps that don’t require Python. First type pip install pyinstaller in CMD (Command Prompt) or bash (Terminal) then wait. Next in CMD or bash, run pyinstaller -f pythonfile.py (replacing pythonfile.py with a python file) and build the app. Next goto the dist folder in the folder that you were working in and grab the .exe or file with no extension (Mac). Now you have the finished program.

Make a Web Server with Flask

Python powers websites around the world. Alot of people use services like Instagram, Facebook, YouTube, Twitter. Guess what? They’re all powered by Python. Let’s make a social media app.

Try this with Flask installed (pip install flask):

from flask import Flask, render_template

app = Flask(__name__)

 

@app.route(“/”)

def home():
        return render_template(“home.html”)

app.run(debug=True)

But don’t run it yet. Now create a new file called home.html in a folder called templates. Inside it put:
<!DOCTYPE html>

<html>
<head>
<title>Hello</title>
</head>
<body>

<style>

body{
font-family: sans-serif

};

</style>

<p>Hello</p>

</body>
</html>

Now the tree of your development folder is:

main.py-

             |

             |

             -templates-

                              |

                              |

                              -home.html

Now run your main script using the command prompt. Run python main.py

                

Now despite what the Command Prompt says go to localhost:5000

You should see Hello.

Press ctrl+c to stop it

Let’s get started.

Now let’s do some HTML.

First, the structure of HTML is like this:
-DOCTYPE <!DOCTYPE html>-

-Start HTML-

-Start Head-

-Start Title-

(Put title here)

-End Title-

-End Head-

-Start Body-

-Start Header-

(Put Header Text here)

-End Header-

(Main Place)

-End Body-

-End HTML-

Now create a file called mypage.html (preferably in a folder called HTML Stuff or something)

We’ll use it later.

Alright, now let’s get to the basics. First, Tags. Tags are anything in between < and >. Now closing tags are anything between </ and >. Now you need a tag name. You can’t just write this:

<></>

<></>

<></>

And so on…

So first you need a DOCTYPE. It tells the browser what it is looking at. The doctype always in <!DOCTYPE html>. So our test page looks like this:

<!DOCTYPE html>

Now let’s learn about the html tag it looks like this:

<html>

Your code here

</html>

Add it to your test page.

Now for the head tag. The head tag is displayed on the tab. For example, the head of a Google Docs page may look like this:
<head>

<title>Google Docs</title>
More stuff...

</head>

So add the head tag to our test page under <html>.

Now it’s this:
<!DOCTYPE html>
<html>
<head>

</head>
</html>

Now we need to add the title tag. The title tag tells the web browser what to display is the title of the tab. For example, the title tag of a Google Docs Page will be <title>Google Docs</title>.

Now let’s make the title of our page My First Website. Let’s add that under the head tag.

Now we have this:
<!DOCTYPE html>

<html>
<head>
<title>My First Website!</title>

</head>
</html>

Now let’s double click on your mypage.html.

Look at the tab. It should be labeled My First Website!

Now let’s get to the almighty tag, Body. Body will replace that blank screen with exciting things.

Add it under </head> like this:

<!DOCTYPE html>

<html>
<head>
<title>My First Website!</title>

</head>

<body>

</body>
</html>

Now we need to add some text to it with <p>

An example is this:
...Code…

<p>Text here</p>

...Code…

Let’s add it under the body tag.

Now we have this.

Take a look:

<!DOCTYPE html>

<html>
<head>
<title>My First Website!</title>

</head>

<body>

<p>Hello World!</p>

</body>
</html>

Moving on to Headings. Headings are very important. You can use the <h1> tag for

Something like this.

You can also do <h2>, <h3> and so on all the way to <h5>
So let’s make our page look like this:

Welcome!

Hello World!

Can you do it? (hint: put it under the body tag)

Here is the answer:

<!DOCTYPE html>

<html>
<head>
<title>My First Website!</title>

</head>

<body>

<h1>Welcome</h1>

<p>Hello World!</p>

</body>
</html>

Next the header. Can you guess what tag it is?

You guessed it, <header>.

Add it like this:

...code here…

<header>

...code here…

</header>

...code here…

Add it to our page above the h1 tag:

Like this:

...Code...
<header>

<h1>Welcome</h1>

</header>

...More code…

One last thing before we get back to GUIs. The style tag.

Now, I am not a master at the styling the page with the style tag, so the info is limited. Use the resources in the back of the book.

The style tag uses CSS to style your page. The most helpful CSS line is font-family.

This will use the fonts on the website/fonts on the viewer’s computer.

Say your site will be viewed from a Chromebook. Your code might look like this:

tag-name-that-you-want-to-apply-this-rule-to{

font-family: Inconolatas;

}

Or:

h1{

font-family: Inconolatas;

}

So let’s add one last thing to our webpage.

<!DOCTYPE html>

<html>
<head>
<title>My First Website!</title>

</head>

<body>

<style>

body{

font-family: sans-serif;

}

<header>

<h1>Welcome</h1>

</header>

<p>Hello World!</p>

</body>
</html>

Now go to your templates folder that we worked on before and rename home.html to home_old.html.

Now copy our mypage.html to our templates folder and rename it home.html.

Now start your web server like we did before and go to localhost:5000.

Admire your new webpage.

Show friends and family.

Use google to expand on this.

Also check out pythonanywhere. More information is at the start of the book.

You got a new badge from all this!

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Hamster Huey and the Gooey Kablooie

???

If it’s in the game, It’s in the game

In this lesson, you will use data APIs (modules) to get information and create a program that will create a Madden OVR like rating for a player. Then, maybe try to incorporate that into a full football Simulation.

NOTE: The content ahead may require:

Outbound Internet Access

Signing up for services

Payments

Note that if you have a free account on pythonanywhere.com and are using that for your code, you need to upgrade your account to a paid account for Outbound Internet Access.

You can also instead of using a Python Module, use a JSON API (see football-data.org). To do this, you need to use the requests module (Requires Outbound Internet Access):

import requests

post = requests.get(“get.example.com”json={“Request Type”:”GET”})

get = requests.post(“post.example.com”json={“Requests Type”:”POST”})

put = requests.put(“put.example.com”, json={“Requests Type”:”PUT”})

post_response = post.json()

get_response = get.json()

put_response = put.json()

Now it’s time to check out PyPI. It’s where every Python Package comes from. So go to PyPI.org and search Football. You should see a list of modules. Pick one, and then copy the code into the Command Prompt or Terminal. Read the docs by clicking on the Homepage button on the sidebar in the PyPI tab. Now let’s move on to the next step. Here’s your goal:

  1. Get the following data: Passing Yards, Rushing Yards, Receiving Touchdowns, Plays not tackled on, and touchdowns for a specific player
  2. Next get the Average of all that data. (See the numpy docs) So like if the players stats are 82 Passing Yards, 1003 rushing yards, 8 Receiving touchdowns, 40 plays not tackled on, 76 touchdowns.
  3. Assign the Average to a variable avg
  4. Make it print this: The player’s estimate overall is: (Put Average Here).

Alright, now let’s get to making the game. Because of how hard 3D is we won’t get to that yet. So let’s do this. First take a look at the pygame docs (pygame.org/docs). Now, before I tell you anything, see if you can figure out how to do these things by using Google, StackOverflow and PyGame docs.

Pip install pygame.

Download an image of the player you’re getting the stats for.

Create an image of the text of the variable avg (see the tutorial before).

Put it on the player's image.

Create a gallery of these.

If you figured it out, Great! Do this now:

Recreate the EA Sports Splash Screen with the old slogan, “If it’s in the game, It’s in the game.''

If you didn’t finish it. I’ll give you a template:

import pygame

pygame.init()

display = pygame.display.set_mode((screen_res_x,screen_res_y))

running = True

while running:

        display.fill(255,255,255)

        display.blit(image,(x,y))

Did you get it yet?

If not, here is a not completely filled in answer:

import pygame

import time

pygame.init()

images = [“slides/slide0.jpg”,”slides/slde1.jpg”,”etc”]

#Set_mode((x,y))

display = pygame.display.set_mode((720,720))

running = True

while running:

        for i in images:

                display.fill(255,255,255)

                display.blit(i, (x,y))

                time.sleep(1)

But this will ONLY display the player images. Now find out how to add the text in the Madden OVR font. Now we need to get to a new topic. Deep Learning.

But before we do that, you got a badge!

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers Don’t Have Brains!

Hamster Huey and the Gooey Kablooie

???

Deep what what what?

Deep Learning. It’s done with this algorithm (this is for integers):

I = input

I - W1 - W2 - W3 - W4 - W5 = O

O = output

Now training the computer.

So, if you have the input [1,2,3]  (remember the weights have to be as long as your input). Now, you have the output [1,0,0]. Now you need a list of inputs and a list of outputs. So like this:

[[1,2,3],[2,3,1],[3,2,1]] and the outputs are [[1,0,0],[2,0,0],[3,0,0]] Next find what the weights need to be to get those answers. Keep doing that until you get the expected answer from the algorithm.

So I did:

I = [4,2,1]

So now we have

W = [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]

Do the algorithm with those and you get

[4,2,1]

Now change the weights

W = [[0,1,1],[0,1,0],[0,0,0],[0,0,0],[0,0,0]]

I got [4,0,0] as my answer

Now, let’s try another one

[3,2,6]

I got [3,1,4]

Let’s try a different one

W = [[0,-1,3], [0,2,3],[0,0,0],[0,0,0],[0,0,0]]

Computers do this very quickly.

And they do it 10,000 times.

Now find a way to make the computer do what you just did.

After you’ve done that you get a badge!

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers Don’t Have Brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Chrunching

Chapter 3: Security and System

Hamster Huey and the Gooey Kablooie

Make an interactive audio book with PyGame.


Fans of the comic strip Calvin and Hobbes will be extremely excited.

Now, we just need to learn one thing. pygame.mixer

pygame.mixer must not be imported with pygame.

Do this to import it:

import pygame, pygame.mixer

pygame.init()

pygame.mixer.init()

pygame.mixer.load(“youraudiofile.extension”)

pygame.mixer.play(1,0,0)

This will play the music youraudiofile.extension 1 time. Now, combine that with what you know and make an audio book.

Tada! You’re done!

It’s dangerous to go alone. Take this badge:

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Hardcore Number Nom Nom Nom

Numbers are possibly the biggest part of Python. So, we need to do that.

The biggest number crunching module is Numpy.

Numpy has a variety of Number Nom Nom functions such as mean, median, mode, and many more. Find the numpy docs.

Let’s create a number crunching program.

So let’s back down from GUI real quick. (You can add it in later)
So first let’s do something like this.

import numpy

cmd_database = [[“mean”, numpy.mean],[“mode”,numpy.mode]]

class Parser(object):

        def __init__(self, binds):
                self.binds = binds

            def parse(self,input,convert=str):
                for i in cmd_database:

                        if input.startswith(i[0]):

                                args = input.split(“ “)

                                #I commented this for a quiz to get this working :)

#newargs = [for i in args convertf(i)]

newargs = []

        for i in args:

          newargs.append(convertf(i))

                                return newargs

Well now just figure out how to modify the Parser class to do what you want and Tada!! That’s this lesson. Oh and I almost forgot:

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

The finale of the Chapter.

Alas, weary traveler, you have reached the end of this chapter.

Please note that from now on, your code will be color coded like this:

import numpy

cmd_database = [["mean", numpy.mean],["median",numpy.median]]

class Parser(object):

  def __init__(self, binds):

    self.binds = binds

  def parse(self,input,convert=str):

    for i in self.binds:

      if input.startswith(i[0]):

        args = input.split(" ")

        newargs = []

        for i in args:

          newargs.append(convertf(i))

        return newargs

parser = Parser(cmd_database)

print(parser.parse("mean 1,2,3"))

You shall now, to continue to the next chapter, create a GUI text adventure using everything you’ve learned from this chapter (and the first one).

After that

You
Have

Earned

Combine it All

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Now this chapter isn’t just about Security and System so don’t drop out if you don’t care.

Let’s begin with basic security. Hashing. Hashing is where it creates a secure version of a password that is Almost undecryptable. You need werkzeug. You can get werkzeug by getting flask.

So now we need to import werkzeug. Next we need to create a hash with:

werkzeug.security.generate_password_hash("password")

Now check the hash against the password

werkzeug.security.check_password_hash("password","hash")

Try hashing the hash. It doesn’t work. So now let’s get back to Flask real quick.

However, before we do that take this.

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Work Zerg Rush

Flask Web Form

???

Now let’s extend our knowledge of Flask. There are a couple things you need to learn. Using virtualenv. Since you (shouldn’t) can’t dump Environment Variables on most computers, you can dump them in a virtualenv. You can pip install virtualenv. Now type virtualenv flask. Now if you’re on Windows type in \flask\scripts\activate into the command prompt. Or if you’re on a Mac type ./scripts/activate You should see (flask) ~/my/current/directory> Now type in (mac) export FLASK_APP=myflaskapp.py. You’ll need to reinstall your packages though. I don't know how to export environment variables in Windows but you can find out. Also, let’s try something new.

  1. Create a folder called app inside a folder called My New Flask App
  2. Now create an app/__init__.py with this code

from flask import App

app = App(__name__)

import app.routes

        

  1. Create an app/routes.py with this:

from app import app

#Put your routes here

  1. Create an main.py with this

        from app import app

app.run(debug=True)

  1. Now go to the command prompt and type these

cd My New Flask App

python main.py

This will start the flask app. (You need to change the app/routes.py for it to work) Tada!! This method is much cleaner than using it all in one file. Let’s add another file

app/modules.py. Put this in it.

from flask import App

Add all your imports here. (We’ll add another soon). Next change this line in your app/__init__.py

from flask import App

To

from app.modules import *

That one line imports everthing. One last thing, templates.

Let’s create a template real quick. Add this to app/templates/base.html

<!DOCTYPE html>

<html>
<head>
<title>My Site - {{ title }}</title>

<link ref=”{{ stylesheet }}” type=”style/css”>

</head>

<body>

<p>Hello World</p>

{% block content %} {% endblock %}

</body>

</html>

Now create a new file called app/templates/index.html

{% block content %}

<p>Posts</p>

<ul>

{% for post in posts %}

<li>{{ post }}</li>

{% endfor % }

</ul>

{% endblock %}

Now add this route:
@app.route('/')

def index():

    return render_template('index.html',title='Home',stylesheet='css/simple.css',posts=['Hi','There'])

(Don’t copy it like this. Copy it like return render_template…)

Now pip install flask-wtf and add this to your app/modules.py:

from wtforms import FlaskForm, TextField

Next create another file called app/views.py

Add this to it:

from app.modules import *

Next, add a class called LoginForm (here’s where security comes in) we also need to add flask.request.set_cookie

#to our

app.modules

Now let’s add this into the LoginForm class:

First, we need to make it inherit from FlaskForm by doing this:

class LoginForm(FlaskForm):

  text = TextField()

Now we need to add a route called formtest:

@app.route('/formtest',methods=['GET','POST'])

def formtest():

  form = LoginForm()

  if form.validate_on_submit():

    print('Content: {}'.format(form.text.content))

  return 'Hi'

Now you’re probably wondering where that LoginForm variable came from. You need to add from app.views import LoginForm

Now this is where you’ll need to take a look at the flask-wtf docs (or the Flask Mega Tutorial, just google it). Can’t find them? Go to pypi.org then search flask-wtf, click on it and click on Documentation.

Next put the code that the Docs told you to do into a file called templates/formtemplate.html and put this in it:

{% block content %}

Put the docs code here…

{% endblock %}
Next change return ‘Hi’ in your routes.py to return render_template(‘formtemplate.html’, title=’Form Test’, form=form)

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Work Zerg Rush

Flask Web Form

The OS Module

???

The OS Module

The OS module includes some cool things.

  1. The os.system function. It’s only positional (required) argument is the command you want to run
  2. The os.error exception (You’ll know what it does later)
  3. And many more! Just 19.99 plus shipping and handling.

So let’s do something cool. Do you have a copy of Minecraft? If so, this one will be interesting:

Just import os then create a command system that will have the command start run java -nogui server.jar (of course, get server.jar from the launcher first). Need help? Here’s a hint:
If #input here == #command here:

Do thing using os.system

Onward!

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Work Zerg Rush

Flask Web Form

The OS Module

The Sys Module

???

The Sys Module

The sys module is used to create things like command line tools (Buildozer is an example). So the main things you need to know are

  1. Sys.argv (a list of arguments)
  2. That’s all
  3. That’s all
  4. No really
  5. I SAID THAT’S ALL

There we go. So that’s all.

Oh one more thing, sys.argv[0] is the same as os.cwd (current working directory)

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Work Zerg Rush

Flask Web Form

The OS Module

The Sys Module

Except What?

Now it’s time to learn about Exceptions. If you type raise Exception(‘Uh Oh!’). See what happens.

There’s an error. It should be:
Exception: Uh Oh!

Now import os and run raise os.error(‘Macs are overpriced’)

You should see:

os.error: Macs are overpriced

Now let’s create an error

Build-A-Exception Workshop

Just use class MyException(Exception):...;

Simple one liner for building an exception.

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Work Zerg Rush

Flask Web Form

The OS Module

The Sys Module

Except What?

Arnold Android

???

Arnold Android

So, let’s talk about building an Android app.

  1. Pip install Buildozer
  2. Pip install Kivy

Look at the output for buildozer --help:
Usage:

    buildozer [--profile <name>] [--verbose] [target] <command>...

    buildozer --version

Available targets:

  android            Android target, based on python-for-android project

Global commands (without target):

  appclean           Clean the .buildozer folder in the app directory.

  distclean          Clean the whole Buildozer environment.

  help               Show the Buildozer help.

  init               Create a initial buildozer.spec in the current directory

  serve              Serve the bin directory via SimpleHTTPServer

  setdefault         Set the default command to run when no arguments are given

  version            Show the Buildozer version

Target commands:

  clean      Clean the target environment

  update     Update the target dependencies

  debug      Build the application in debug mode

  release    Build the application in release mode

  deploy     Deploy the application on the device

  run        Run the application on the device

  serve      Serve the bin directory via SimpleHTTPServer

Target "android" commands:

  adb                Run adb from the Android SDK. Args must come after --, or

                     use --alias to make an alias

  clean              Clean the build and distribution

  logcat             Show the log from the device

  p4a                Run p4a commands. Args must come after --, or use --alias

                           to make an alias

So now you need to read some docs on kivy, then when you’re ready (preferably on a Linux Machine) run buildozer init and it should output this:

File buildozer.spec created, ready to customize!

This creates a buildozer.spec with this:
[app]

# (str) Title of your application

title = My Application

# (str) Package name

package.name = myapp

# (str) Package domain (needed for android/ios packaging)

package.domain = org.test

# (str) Source code where the main.py live

source.dir = .

# (list) Source files to include (let empty to include all the files)

source.include_exts = py,png,jpg,kv,atlas

# (list) List of inclusions using pattern matching

#source.include_patterns = assets/*,images/*.png

# (list) Source files to exclude (let empty to not exclude anything)

#source.exclude_exts = spec

# (list) List of directory to exclude (let empty to not exclude anything)

#source.exclude_dirs = tests, bin

# (list) List of exclusions using pattern matching

#source.exclude_patterns = license,images/*/*.jpg

# (str) Application versioning (method 1)

version = 0.1

# (str) Application versioning (method 2)

# version.regex = __version__ = ['"](.*)['"]

# version.filename = %(source.dir)s/main.py

# (list) Application requirements

# comma separated e.g. requirements = sqlite3,kivy

requirements = python3,kivy

# (str) Custom source folders for requirements

# Sets custom source for any requirements with recipes

# requirements.source.kivy = ../../kivy

# (list) Garden requirements

#garden_requirements =

# (str) Presplash of the application

#presplash.filename = %(source.dir)s/data/presplash.png

# (str) Icon of the application

#icon.filename = %(source.dir)s/data/icon.png

# (str) Supported orientation (one of landscape, sensorLandscape, portrait or all)

orientation = portrait

# (list) List of service to declare

#services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY

#

# OSX Specific

#

#

# author = © Copyright Info

# change the major version of python used by the app

osx.python_version = 3

# Kivy version to use

osx.kivy_version = 1.9.1

#

# Android specific

#

# (bool) Indicate if the application should be fullscreen or not

fullscreen = 0

# (string) Presplash background color (for new android toolchain)

# Supported formats are: #RRGGBB #AARRGGBB or one of the following names:

# red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,

# darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,

# olive, purple, silver, teal.

#android.presplash_color = #FFFFFF

# (list) Permissions

#android.permissions = INTERNET

# (int) Target Android API, should be as high as possible.

#android.api = 27

# (int) Minimum API your APK will support.

#android.minapi = 21

# (int) Android SDK version to use

#android.sdk = 20

# (str) Android NDK version to use

#android.ndk = 17c

# (int) Android NDK API to use. This is the minimum API your app will support, it should usually match android.minapi.

#android.ndk_api = 21

# (bool) Use --private data storage (True) or --dir public storage (False)

#android.private_storage = True

# (str) Android NDK directory (if empty, it will be automatically downloaded.)

#android.ndk_path =

# (str) Android SDK directory (if empty, it will be automatically downloaded.)

#android.sdk_path =

# (str) ANT directory (if empty, it will be automatically downloaded.)

#android.ant_path =

# (bool) If True, then skip trying to update the Android sdk

# This can be useful to avoid excess Internet downloads or save time

# when an update is due and you just want to test/build your package

# android.skip_update = False

# (bool) If True, then automatically accept SDK license

# agreements. This is intended for automation only. If set to False,

# the default, you will be shown the license when first running

# buildozer.

# android.accept_sdk_license = False

# (str) Android entry point, default is ok for Kivy-based app

#android.entrypoint = org.renpy.android.PythonActivity

# (str) Android app theme, default is ok for Kivy-based app

# android.apptheme = "@android:style/Theme.NoTitleBar"

# (list) Pattern to whitelist for the whole project

#android.whitelist =

# (str) Path to a custom whitelist file

#android.whitelist_src =

# (str) Path to a custom blacklist file

#android.blacklist_src =

# (list) List of Java .jar files to add to the libs so that pyjnius can access

# their classes. Don't add jars that you do not need, since extra jars can slow

# down the build process. Allows wildcards matching, for example:

# OUYA-ODK/libs/*.jar

#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar

# (list) List of Java files to add to the android project (can be java or a

# directory containing the files)

#android.add_src =

# (list) Android AAR archives to add (currently works only with sdl2_gradle

# bootstrap)

#android.add_aars =

# (list) Gradle dependencies to add (currently works only with sdl2_gradle

# bootstrap)

#android.gradle_dependencies =

# (list) add java compile options

# this can for example be necessary when importing certain java libraries using the 'android.gradle_dependencies' option

# see https://developer.android.com/studio/write/java8-support for further information

# android.add_compile_options = "sourceCompatibility = 1.8", "targetCompatibility = 1.8"

# (list) Gradle repositories to add {can be necessary for some android.gradle_dependencies}

# please enclose in double quotes

# e.g. android.gradle_repositories = "maven { url 'https://kotlin.bintray.com/ktor' }"

#android.add_gradle_repositories =

# (list) packaging options to add

# see https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html

# can be necessary to solve conflicts in gradle_dependencies

# please enclose in double quotes

# e.g. android.add_packaging_options = "exclude 'META-INF/common.kotlin_module'", "exclude 'META-INF/*.kotlin_module'"

#android.add_gradle_repositories =

# (list) Java classes to add as activities to the manifest.

#android.add_activites = com.example.ExampleActivity

# (str) OUYA Console category. Should be one of GAME or APP

# If you leave this blank, OUYA support will not be enabled

#android.ouya.category = GAME

# (str) Filename of OUYA Console icon. It must be a 732x412 png image.

#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png

# (str) XML file to include as an intent filters in <activity> tag

#android.manifest.intent_filters =

# (str) launchMode to set for the main activity

#android.manifest.launch_mode = standard

# (list) Android additional libraries to copy into libs/armeabi

#android.add_libs_armeabi = libs/android/*.so

#android.add_libs_armeabi_v7a = libs/android-v7/*.so

#android.add_libs_arm64_v8a = libs/android-v8/*.so

#android.add_libs_x86 = libs/android-x86/*.so

#android.add_libs_mips = libs/android-mips/*.so

# (bool) Indicate whether the screen should stay on

# Don't forget to add the WAKE_LOCK permission if you set this to True

#android.wakelock = False

# (list) Android application meta-data to set (key=value format)

#android.meta_data =

# (list) Android library project to add (will be added in the

# project.properties automatically.)

#android.library_references =

# (list) Android shared libraries which will be added to AndroidManifest.xml using <uses-library> tag

#android.uses_library =

# (str) Android logcat filters to use

#android.logcat_filters = *:S python:D

# (bool) Copy library instead of making a libpymodules.so

#android.copy_libs = 1

# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64

android.arch = armeabi-v7a

#

# Python for android (p4a) specific

#

# (str) python-for-android fork to use, defaults to upstream (kivy)

#p4a.fork = kivy

# (str) python-for-android branch to use, defaults to master

#p4a.branch = master

# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)

#p4a.source_dir =

# (str) The directory in which python-for-android should look for your own build recipes (if any)

#p4a.local_recipes =

# (str) Filename to the hook for p4a

#p4a.hook =

# (str) Bootstrap to use for android builds

# p4a.bootstrap = sdl2

# (int) port number to specify an explicit --port= p4a argument (eg for bootstrap flask)

#p4a.port =

#

# iOS specific

#

# (str) Path to a custom kivy-ios folder

#ios.kivy_ios_dir = ../kivy-ios

# Alternately, specify the URL and branch of a git checkout:

ios.kivy_ios_url = https://github.com/kivy/kivy-ios

ios.kivy_ios_branch = master

# Another platform dependency: ios-deploy

# Uncomment to use a custom checkout

#ios.ios_deploy_dir = ../ios_deploy

# Or specify URL and branch

ios.ios_deploy_url = https://github.com/phonegap/ios-deploy

ios.ios_deploy_branch = 1.7.0

# (str) Name of the certificate to use for signing the debug version

# Get a list of available identities: buildozer ios list_identities

#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"

# (str) Name of the certificate to use for signing the release version

#ios.codesign.release = %(ios.codesign.debug)s

[buildozer]

# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))

log_level = 2

# (int) Display warning if buildozer is run as root (0 = False, 1 = True)

warn_on_root = 1

# (str) Path to build artifact storage, absolute or relative to spec file

# build_dir = ./.buildozer

# (str) Path to build output (i.e. .apk, .ipa) storage

# bin_dir = ./bin

#    -----------------------------------------------------------------------------

#    List as sections

#

#    You can define all the "list" as [section:key].

#    Each line will be considered as a option to the list.

#    Let's take [app] / source.exclude_patterns.

#    Instead of doing:

#

#[app]

#source.exclude_patterns = license,data/audio/*.wav,data/images/original/*

#

#    This can be translated into:

#

#[app:source.exclude_patterns]

#license

#data/audio/*.wav

#data/images/original/*

#

#    -----------------------------------------------------------------------------

#    Profiles

#

#    You can extend section / key with a profile

#    For example, you want to deploy a demo version of your application without

#    HD content. You could first change the title to add "(demo)" in the name

#    and extend the excluded directories to remove the HD content.

#

#[app@demo]

#title = My Application (demo)

#

#[app:source.exclude_patterns@demo]

#images/hd/*

#

#    Then, invoke the command line with the "demo" profile:

#

#buildozer --profile demo android debug

Now customize it. You can see everything you need to. Lines with a # at the beginning are commented out and are ignored. Next create a file called main.py. Read the Kivy Docs to find out how to make your app and 3...2...1...0 Takeoff time!

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Work Zerg Rush

Flask Web Form

The OS Module

The Sys Module

Except What?

Arnold Android

Takeoff!

???

Takeoff!

Let’s get your apps somewhere! Here are some places to deploy your app and make money!

  1. Microsoft Store
  2. Apple App Store
  3. Google Play Store
  4. Square
  5. Discord
  6. Steam

We’ll review how to put your app here.

Number 1 is the Microsoft store.

  1. Search Microsoft Developer Portal
  2. Create an account
  3. Create an app
  4. Download Microsoft’s dispatch tool

Now, Why aren’t these accurate? Because, I personally, have never tried to deploy to the Microsoft Store because of expenses.

Next up, Apple App Store

Now these I somewhat remember from when I wanted to make mobile games so these are more accurate.

  1. Find the Apple Developer Portal
  2. Create an account
  3. Create an application
  4. Upload it

Next, Google Play

I remember these instructions.

  1. Create an Android developer account
  2. Create an account
  3. Upload your APK

Next, Square. Create a Square account and set up a store and sell your app on flash drives with piracy protection on them. That was simple.

Next to last, but not next to least, Discord. I have (almost, I never paid the fee) created an app here.

  1. Go to the Developer Portal
  2. Sign in with your Discord Account
  3. Click on Teams
  4. Click on New Team to create a team
  5. Go to applications
  6. Click on new application
  7. Click the drop down that says Personal
  8. Select the name of your team
  9. Select the blurple Create button
  10. Finally select Developer License
  11. Now download Discord Dispatch
  12. Follow the instructions to add your app to Discord

Note: These instructions require a Discord Account and a Discord Server. If you are not 13 or older or at a school, please do not follow these instructions

Last, but certainly not least, Steam

  1. Go to the steam developer portal
  2. Create an application
  3. Upload your game

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Work Zerg Rush

Flask Web Form

The OS Module

The Sys Module

Except What?

Arnold Android

Takeoff!

Plyer

???

Plyer

pip install plyer. Now import it. So now type print(dir(plyer)). Now let’s look at the results. Ignore the:

['Proxy',

 '__all__',

 '__builtins__',

 '__cached__',

 '__doc__',

 '__file__',

 '__loader__',

 '__name__',

 '__package__',

 '__path__',

 '__spec__',

 '__version__',

Now let’s see the APIs:

 'accelerometer',

 'audio',

 'barometer',

 'battery',

 'bluetooth',

 'brightness',

 'call',

 'camera',

 'compass',

 'cpu',

 'email',

 'facades',

 'filechooser',

 'flash',

 'gps',

 'gravity',

 'gyroscope',

 'humidity',

 'irblaster',

 'keystore',

 'light',

 'notification',

 'orientation',

 'processors',

 'proximity',

 'screenshot',

 'sms',

 'spatialorientation',

 'storagepath',

 'stt',

 'temperature',

 'tts',

 'uniqueid',

 'utils',

 'vibrator',

 'wifi']

Now examine all of the APIs (ignore facades).

When I first started using this API (one day before writing this). The first thing I jumped to was the notifications. So run plyer.notifications.send(title=’Hello’,text=’World’,app_title=’Python’) and see the results. However, using something like plyer.call on Windows will crash your program. Use the Sys module to get which platform the user is on, and use respective APIs.

Now, experiment with what you could do. Combine Plyer with your android app (add plyer to the requirments= line of your buildozer.spec).

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Work Zerg Rush

Flask Web Form

The OS Module

The Sys Module

Except What?

Arnold Android

Takeoff!

Plyer

Expand your Knowledge

???

Expanding your Knowledge

  1. Pandas3D, a cool 3D module
  2. The dir function, allows you to explore the contents of an object or module
  3. PyOpenGL, install this to unlock pygame.3d
  4. Pygame.examples. Import this for some examples

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Work Zerg Rush

Flask Web Form

The OS Module

The Sys Module

Except What?

Arnold Android

Takeoff!

Plyer

Expand your Knowledge

Cython

???

Cython

Pip install cython then in the command prompt run Cython <python file here> -o <outputfile.c>.

This can make your programs run in C++ instead of python. This makes it go much faster.

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Work Zerg Rush

Flask Web Form

The OS Module

The Sys Module

Except What?

Arnold Android

Takeoff!

Plyer

Expand your Knowledge

Cython

Combine it All

Combine it All

This is the end of the BOOK. So do an extra good job.

Combine everything you’ve learned.

You

Have

Earned Combine It all

You made your first program!

Welcome to the Internet!

Data

More Data

Yes or No?
SQL Time

Combine it All

Chapter 2: Modules and More

Install and Import

Go Graphical

World Wide

Game Time

Computers don’t have brains!

Hamster Huey and the Gooey Kablooie

Hardcore Number Nom Nom Nom

Combine It All

Chapter 3: Security and System

Work Zerg Rush

Flask Web Form

The OS Module

The Sys Module

Except What?

Arnold Android

Takeoff!

Plyer

Expand your Knowledge

Cython

Combine it All

Well, this is not the end of your journey. Learn as much as you can. But that’s all for my book. Out!