Python Programming for Dummies Lesson 1- I know nothing and I wrote my first line of code!

in #python8 years ago

Ok, yes, I have never written any code, unless you consider the Little Orphan Annie Decoder Pin I had as a kid. Yes, I have put it off for years, and at the ripe old age of 38, after hearing and talking enough in this forum, I figure if I take at least 15 minutes a day about my learning a programming language and blog about it, by the end of the year, I should be more awesome than I was if I hadn't! Don't expect to take over the world, I'll wait til next year to do that. So let's get ready for ground zero, lesson one.

Ok, first things first. We need to get the program. This is a free program that is located on www.python.org. Go to the downloads button and download the latest version. I got Python Version 3.5(32 bit), whatever the hell that means. We'll learn along the way, so don't worry. 

Ok so once you click to save the file, look up at that beautiful download button on the upper righthand side of your computer screen, ticking down the seconds. Once done, go ahead and save it to a place you will remember it. I saved mine to my desktop Python folder I created, just in case I forget, I also pinged it to my toolbar.

Next, for ease of use, I downloaded Notepad ++ from https://notepad-plus-plus.org//

Got version 6.9.2 and saved that to the same folder. I know, I know, all this downloading is boring, but you're all done with that part now.

Now open up your python app. Black screen. Let's tell your computer to 

do something.


Ok type in the following:

print("Hello World")

You will see the following program you wrote print Hello World below, because you programmed it to do so. Should look like this:

You will see Hello World below that line YAY! Your first programNow try typing the following

x = 1

x = "Hello World"

now hit x and hit enter... Hello World should show up! Congrats!

You are now on your way to being a beginner! Next Lesson will be much more fun, I promise. Less downloading, more programming language. Remember folks, once you learn one language, you will pick up the rest much quicker, should you decide to do so!

Upvote and Post, and make sure to follow, because if a guy like me can learn programming, you don't wanna have me talking over your head, so keep up, pass me up or be left in the dust!


Sort:  

Fwiw, doing

x = 1
x = 'Hello world'

is completely equivalent to

x = 'Hello world'

 

x is set to 1, then set to 'Hello world', so the 1 is lost forever. :)

This was just a beginner example of chain programming. Thanks for the advice though. I hope to see more comments as we go forward :)

Good luck learning python! Feel free to ping me if you get stuck on something and need some clarification. I've always thought python is probably the easiest way to learn programming, so you've chosen well. :)

I received good advice. Choosing that good advice was my luck. I'll hit you up for sure. And thank you.

I think the 1 should have been used in the second line for a better example. You're right. Thank you:)

Oh, and by the way, if you wrap your code sectons in triple-backticks:
```
like this
```
...it makes it look all codely like this, which makes the code sections easier to read.

Thanks! Ill incorporate that in tomorrow's post, too :)

Excellent post! Keep it up!!! :)

Thanks, man. I REALLY wanna start this thing from the extremely base level and take readers from A to Z as I go, struggling with them, learning from replies, etc. Make this community what it is meant to be for, an information hub where the intellectual class can grow. (A couple thousand more posts, I may be able to join that class. lol)

Nice! Learning python is deffinetly on my list

Join me! I am going to put these up regularly, berek.

Excellent tutorial. I've read that everyone should know at least a little bit of coding these days. I know some HTML (all self-taught), but that's all, so far. I'd like to learn some more coding languages.

Well, I'm gonna go step by step as I learn Python, so follow along. We can all struggle to perfection in Python together! Many hands makes for light work.

Following you. I've used python at a very amateur level for years, and every time I get back into it I think "why don't I use this more?" Anyway, good luck, and I'll be watching for your next posts.

Thanks! Next one tomorrow night

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 59986.17
ETH 2417.93
USDT 1.00
SBD 2.45