Course Python For Life 2



Hello folks! Now I present to you the lesson 2 of Python Course. In this lesson, we’ll see the first steps and began to programming. Below, see a small introduction.

Python is an interpreted programming language, what’s it? See below a definition.

Literally defined, a language which is not compiled directly into machine code. Most Scripting Languages are Interpreted Languages, since they are executed directly from their textfile format, and no intermediate format is stored on disk.

Source: http://wiki.c2.com/?InterpretedLanguage


Now, let’s go to began coding. I use the default interpreter that’s available when you install Python in your computer, but you can use other softwares.

Open your IDE and create a new file. See the image below.


This is the file created. Now, let’s go to some important things. The input and output commands in Python language.

Note: I’m using python3.6, as whole course will be done.

In Python language, the output commands works to print words at display. Its structure is: print(“”) or print(‘’). Below see two note.

Note1: Be careful with ‘’ or “” use, mainly with ‘’, because they works like apostrophe too. You can use both.

Note2: In python 2.7, you could use just print “word” or print ‘word’, but in python 3.6, that’s impossible!

Now, you can write your first software in Python language. It’s simple, but everything began like this.

- Write a software that print Hello, I’m alive at display.

First create a file, after you just write this message with a presented structure.

See the code structure:


Finished! Your first software in python language. For run it, push F5, the file will be save and so ran.


In the next lesson, we’ll see the input command in python language. Share this lesson with your friends and let’s go to learn python.

Well, that’s all folks!
See you later!

Comentários

More Famous Posts

Course C Initial 7th – Training with Math

Course C Initial – 3rd Variables Part. 1

Course Python For Life 3 – Input Command