def learn_python(world): print “hello” + world. Learning to code #1

in #steemdev7 years ago

Python3-powered_hello-world.svg_.png


For quite some time now I’ve been meaning to learn another coding language. Through my job as 3d animator I learned to write scripts using maxscript, 3ds Max’s native coding language.

It’s great for what it does and it gradually welcomed me into the world of coding, but it only works inside of max. And I want to do more, code more, make useful applications or small programs or whatnot.
After reading @cryptoctopus' post on his journey learning HTML with CSS & Javascript, I decided that indeed, there is no time like the present.

Python


Therefor I decided to start learning Python. It’s syntax is rather similar to maxscript, which should make it a little bit easier for me to pick up. Having done a few lessons already I can tell this is helping me tremendously.

For instance, what's called an Array in maxscript is called a List in Python. a maxscript Struct is similar to Pythons Dictionary. So it's the same beast by a different name (and slightly different syntax and characters to use)

Codecadamy.com


I've decided to use codecadamy.com to walk through the general syntax and programming rules concerning Python. It's UI is pretty nice with the lesson on the left, the coder (writing app) in the center and a console (output) on the right.
image.png

It works really great for me. The lesson on the left usualy shows a bit of sample code, followed by the actual excercise. In the center I can type the actual code the excercise is looking for and when I press run and my code is in order, I can proceed to the next lessons. If the code is flawed, the console on the right will spit out a debugtext showing what might be wrong with the code.

As with most 'tutorials' or courses, the inside joke is that the first thing you learn is to print 'hello world' to the console, hence the title. Though the text is different, this course is no different in starting with printing something to the console.

As I progress through this course, I hope to share parts of this adventure with you and hope that in the end, I can code something actually useful. And since having a goal/target works best when learning something new, I hope that I myself at the least, but perhaps others as well might use whatever I am able to create to interact with the Steem Blockchain.


Full STEEM ahead my fellow Steemians - @eqko


Me and my fellow blockbrothers are a witness as @blockbrothers. If you want to support us we would appreciate your vote here. Or you could choose to set us as your proxy.
witness_vote.gif


Vote for @blockbrothers via SteemConnect
Set blockbrothers as your proxy via SteemConnect

As blockbrothers, we build Steemify, a notification app for your Steemit account for iOS.
Get it Here:


Sort:  

I wish you every success in mastering Python!

From screen shot I'm assuming that codecademy uses Python 2.7.

print "something" # Python 2.7
print("something") # Python 3+

As someone just starting (just like me) I'm suggesting you to start learning newer Python version.

2.7 is slowly leaving. And there are certain newer things that are not being supported any more. There is absolutely no reason to start learning something that is being outdated.

I deliberately skip any tutorial that uses 2.7 it is just not worth it in my opinion.

P.s.
I can't remember any more why, but you have my Witness vote :-)

Well shit ... that’s putting a damper on it ... didn’t know there were such differences within the language from one version to the next. Will have to check whats what. Thanks for the heads up.

ps. the witness vote might be because blockbrothers (our witness) makes Steemify. Regardless though, thanks for the vote 😊

Actually, happened only once, several years ago, Python got complete overhaul, they fixed many things from the past and in the process they broke backward version compatibility. Some companies are still running Python 2.7 (will be getting security updates up to 2020) because code they have is huge and it takes time to update it.

Example I gave you is, python 2.7 used print as statement and Python 3+ uses print as function, that's why it changed to print().

So, don't worry, there will not be this kind of radical changes going forward. But someone that is just starting with Python should definitely start learning Python +3. (latest current version is 3.6 with 3.7 just about getting ready) But any 3+ will do. Most Linux distros have preinstalled 3.5 while on Windows you just manually install latest one.

Thanks for the explanation. I think I’ll run this course just because I like how it’s set up. And then run another one (SoloLearn) thats on Python 3. It’ll help with confounding the code I learned while updating it to 3+

Success. Am on a journey too in python

good luck !

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.032
BTC 60880.00
ETH 2626.54
USDT 1.00
SBD 2.57