# Welcome

In this section of the Nathan Tech website, it is our intension to provide you the ability to start from knowing absolutely nothing about programming, to being able to use python compitantly for any project you choose, simply by following these tutorials.
Each tutorial is roughly 15 minutes in length, and will walk you through step-by-step explanations, with frequent recaps of each part.
the tutorials are divided into two sections:
• Section 1: Learning. this section teaches you all the terms and knowledge you will need to make anything in python.
• Section 2: Applying. This section will apply the knowledge you have learned into building a small audio game.
Each tutorial is available for download and may be freely distributed providing it is clear that we, Nathan Tech, are the owners of, and recorders of, the tutorial and that the tutorial remains unmodified and free.
Please provide feedback through our Contact Form.

# Section 1: Learning.

## 2: Variables

We talk about the 6 most common variable types and the print command.
• str(1.5): converts to a string
• int(1.5): converts to an int
• float(3): Returns a float.
• Ints: number=1
• Floats: number=1.5
• Strings: name="Nathan"
• Booleans: boy=True
• Lists: [1, 2, 3, 4, 5]
• Dictionaries: d={}
d["name"]="nathan"
d["gender"]="boy"
print("hello");
name="Nathan"
print("hello "+name) /hr />

## 3, if, elif, and else

In this tutorial we go over the different ways to use the if statement.
```number=1
if(number==1):
print(number)
```

```number=10
if(number>5):
print("nice")
elif(number<3):
print("rubbish")
else:
```

```score=10
if(score<2):
print("What game are you playing?")
elif(score>=2 and score<7):
elif(score>7):
print("great score")
```

```score=10
if(score>3 and score<5):
elif(score>=5):
if(score==10):
print("NICE!")
else:
else:
print("rubbish!")
```

## 4: loops

In this tutorial, we introduce the for and while loop, as well as a couple of builtin functions. Download
```number=1
while(number<10):
print(number)
number=number+1
```

```number=1
while(number<10):
if(number==5):
break
print(number)
number=number+1
```

```l=[1, 2, 3]
length(l)
range(3)
```

```l=["bob", "freddy", "jimmy"]
for x in l:
print(x)
```

```l=["bob", "freddy", "jimmy"]
print(l)
for x in range(len(l)):
print(x)

l=["bob", "freddy", "jimmy"]
for x in (range(len(l)):
print(str(x+1)+" "+l[x])

5: functions
We introduce how to use functions, and explain why they are useful.

Sorry, your browser doesn't support this format.

def test(x):
print(x)

def sum(l):
total=0
for x in l:
total=total+x

def inrange(px, ex):
n=px-ex
if(n<3):
return 1;
else:
return 0

dir and getting help
This tutorial covers how to google your problems, how to understand tracebacks, and when not to ask silly questions.

Sorry, your browser doesn't support this format.

7: Modules
The final in the series, this tutorial covers modules, the import command, the pip command, and an example of the time module.

Sorry, your browser doesn't support this format.

import time
time.time()
time.ctime()
pip install clipboard
pip uninstall clipboard
import clipboard
clipboard.copy("hello")

Section 2: Applying.
Coming soon!
Back to the top
```