Python Bootcamp: 3.1.x!

WARNING THIS GUIDE IS FOR INEXPERIENCEd people!

Welcome to Poopyfoot’s Python Boot Camp. You will learn the basics of Python here, so lets get to the coding.

I assume you have the following things:

  • Python 3.1.x
  • Know what IDLE is
  • A Brain, jk.
  • Be able to read this (Know English)

Lets get down to the coding~~, shall we?~~

First Open Up IDLE by searching Python in your “Home” or whatever.

Ignore this, just go ahead and click File New Window (CTRL+N)

Now, go ahead and save, name it I am an Idiot erhm My First Python Thing

PRINT FUNCTION

I will teach you now, the Ultimate function. Print. Print basically prints text on your screen. Of course you can’t just go ahead and write

print lolI I am such a boss at coding yolo swag

Functions have, well, lets call them “rules”. Print has a few rules… Write this

print ("Hello world")

Print is your function, Hello world is your argument.

Go ahead and press F5, no, it won’t refresh, F5 Runs your program (Kind of like debugging in VB)

You should get this:


Hello world

Now write this:```

print (“Hellow world”)

print (“I mean, Hello Python”)

print (“I am using you”)


When you write that, the program reads

print (“Hellow world”)

So it reads

Hello World


Then it reads: I mean,Hello Python and then I am using you. So what does this mean? Its basically like a list. Try:```

print ("1, 2, Freddy's coming for you,")

print ("3, 4, lock your door,")

print ("5, 6, grab your crucifix,")

print ("7, 8, better stay up late,")

print ("9, 10, never sleep again")

So, I think you figured out the Rules “Print” follows. But it doesn’t end there! You can also write problems for example, if you write:


print (5+5)

Then it will show you


5

But if you write:


print ("5+5")

It will show you


5+5

Python has seven basic operations for numbers:

So those are basic things you can do with Print. Now if you ever get far with python and you make something really big and release it as open source you will want to add comments, to add coments just put this:


print ("Poopyfoot is a boss") #Edit this and I will sue you, for no reason.


#Edit this and I will sue you, for no reason.

```That's a comment.

INPUTS AND VARIABLES

I will teach you what an Input is! Input basically lets the user write, so for example lets set a question and name it "name", we are using variables here, so put your seatbelt on.

name = input (“What is your name?”)


Now I'm not going to tell you this every time, but when I show you a program I recommend that you type it in and run it. I learn better when I type it in and you probably do too

Lets recall the variable!

print ("It is a pleasure to meet you, " + name)


This basically means It is a pleasure to meet you + thenameyouruserwrote

So it should come out like this:

It is a pleasure to meet you, NAMEHERE

Now, you can also set variables yourself, for example

a=10


a=10

print (a)

a= a +10

print (a)

a= a * 2

print (a)


To set a variable, don't use spaces. Now try this code:

name = input(“Write your name”)

print (“Your name is, " + name + " right?”)

name=“sucker”

print (“Your new name is " + name + " muahahah!”)


To set your variable as a word, you have to use quotation marks (") or Python will tell you the variable has not been set. You don't need to use " for numbers tho.

–Lesson 1 is DONE-

Good tutorial, and lol Freddy. Original.

Good to have more tutorials around. Thanks or submitting :)

Thanks guys, I am still adding more stuff.

python ftw

Log in to reply