Tuesday 14 October 2014

Assalamualaikum and hye to everybody.. This week we have learn the command python in the class.
Then, I would like to share for what I'm doing with the link tutorial that En.Azrul provide. Tq En.Azrul for that link.

Firstly, this is what I have done..


If you can see, there's some SyntaxError in the image because I'm just copy paste the command. The correct way is put the first command which is print ("My first Python code!") and then press ENTER. From this command, I can realize where is my mistake that causing the SyntaxError. Therefore, need to be alert with any command given.

Secondly, I have tried the 'if statement'. It requires some step because its not easy as above statement but not too difficult. We also have tried it in the class. First, I copy the 'if statement' to the notepad or notepad++. Then, I save it as python2.py in the desktop.


Then, to see the 'if statement' is function, I open the cmd. When cmd opening, type:

  1. cd Desktop, then press Enter.. 
  2. dir, then press ENTER..  
  3. python2.py, then press ENTER
Lastly, the result come out... 




 
Its Done!!! thats all I want to share for this week..tq....


No comments:

Post a Comment