2013年4月19日 星期五

First Lesson, Print

Today, I am teaching you one of the basic string you will need for programming, that is the print string.

this is what it looks like:
print()

In this phrase, you can put in numbers you want 
As an example, if you type these words and run,

print (12345);
the following words will show out:

12345

It is easy right? Someone may ask, what if I want to show some words. To put words in print, we need phrase around it, because phrase tells computer not to do what we have wrote in the phrase. In this time, the computer will see it as a object that needs to be show out.
this is the example:

print("happy dog");
you will see the following words:

happy dogs

Remember to put ";" after each sentence, so the computer will notice that this is a end of command. Each individual words or phrases should be separate by ",", so the computer can notice their differences. 

If there is anything you do not understand, welcome to ask questions. 

沒有留言:

張貼留言