Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Power Lifting Lever Belt
SkullVamp
Updated:
Saturday at 10:32 PM
Ad icon
port.lk Domain for sale
Lankan-Tech
Updated:
Saturday at 3:55 PM
Colombo
Kaduwela - Two Storey House for Sale
dilrasan
Updated:
Thursday at 2:23 PM
Ad icon
Wechat qr verification
Pawan2005
Updated:
Thursday at 1:28 AM
🚀 GOOGLE AI PRO 18 MONTHS ACTIVATION 🚀
sayuru bandara
Updated:
Wednesday at 5:34 PM
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
Education
Python The Worlds Most flexible and easist Language..
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="gayan kalhara" data-source="post: 3253183" data-attributes="member: 60168"><p><strong>Part 1 Intro</strong></p><p></p><p style="text-align: center"><span style="font-size: 12px">Intro</span></p> <p style="text-align: center"></p><p> 1.1 First things first</p><p>So, I think you’ve never programmed before. As we go through this tutorial I will attempt to teach you how to program.</p><p>There really is only one way to learn to program. You must read code and write code. I’m going to show you lots of</p><p>code. You should type in code that I show you to see what happens. Play around with it and make changes. The worst</p><p>that can happen is that it won’t work. When I type in code it will be formatted like this:</p><p></p><p>##Python is easy to learn</p><p>print "Hello, World!"</p><p></p><p>That’s so it is easy to distinguish from the other text. To make it confusing I will also print what the computer outputs</p><p>in that same font.</p><p>Now, on to more important things. In order to program in Python you need the Python software. If you don’t</p><p>already have the Python software go to <a href="http://www.python.org/download/" target="_blank">http://www.python.org/download/</a> and get the proper version for your platform.</p><p>Download it, read the instructions and get it installed.</p><p>1.2 Installing Python</p><p>First you need to download the appropriate file for your computer from <a href="http://www.python.org/download" target="_blank">http://www.python.org/download</a>. Go to the 2.5</p><p>link (or newer) and then get the windows installer if you use Windows or the rpm or source if you use Unix.</p><p>The Windows installer will download to file. The file can then be run by double clicking on the icon that is downloaded.</p><p>The installation will then proceed.</p><p>If you get the Unix source make sure you compile in the tk extension if you want to use IDLE.</p><p>1.3 Interactive Mode</p><p>Go into IDLE (also called the Python GUI). You should see a window that has some text like this:</p><p>1</p><p>Python 2.5 (#4, Dec 12 2007, 19:19:57)</p><p>[GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2</p><p>Type "copyright", "credits" or "license" for more information.</p><p>IDLE 0.6 -- press F1 for help</p><p>>>></p><p>The >>> is Python way of telling you that you are in interactive mode. In interactive mode what you type is immediately</p><p>run. Try typing 1+1 in. Python will respond with 2. Interactive mode allows you to test out and see what Python</p><p>will do. If you ever feel you need to play with new Python statements go into interactive mode and try them out.</p><p>1.4 Creating and Running Programs</p><p>Go into IDLE if you are not already. Go to File then New Window. In this window type the following:</p><p>print "Hello, World!"</p><p>First save the program. Go to File then Save. Save it as ‘hello.py’. (If you want you can save it to some other</p><p>directory than the default.) Now that it is saved it can be run.</p><p>Next run the program by going to Edit then Run script. This will output Hello, World! on the</p><p>*Python Shell* window.</p><p>Confused still? Try this tutorial for IDLE at <a href="http://hkn.eecs.berkeley.edu/" target="_blank">http://hkn.eecs.berkeley.edu/</a> dyoo/python/idle intro/index.html</p><p>1.5 Using Python from the command line</p><p>If you don’t want to use Python from the command line, you don’t have too, just use IDLE. To get into interactive</p><p>mode just type python with out any arguments. To run a program create it with a text editor (Emacs has a good</p><p>python mode) and then run it with python program name.</p></blockquote><p></p>
[QUOTE="gayan kalhara, post: 3253183, member: 60168"] [b]Part 1 Intro[/b] [CENTER][SIZE=3]Intro[/SIZE] [/CENTER] 1.1 First things first So, I think you’ve never programmed before. As we go through this tutorial I will attempt to teach you how to program. There really is only one way to learn to program. You must read code and write code. I’m going to show you lots of code. You should type in code that I show you to see what happens. Play around with it and make changes. The worst that can happen is that it won’t work. When I type in code it will be formatted like this: ##Python is easy to learn print "Hello, World!" That’s so it is easy to distinguish from the other text. To make it confusing I will also print what the computer outputs in that same font. Now, on to more important things. In order to program in Python you need the Python software. If you don’t already have the Python software go to [URL="http://www.python.org/download/"]http://www.python.org/download/[/URL] and get the proper version for your platform. Download it, read the instructions and get it installed. 1.2 Installing Python First you need to download the appropriate file for your computer from [URL="http://www.python.org/download"]http://www.python.org/download[/URL]. Go to the 2.5 link (or newer) and then get the windows installer if you use Windows or the rpm or source if you use Unix. The Windows installer will download to file. The file can then be run by double clicking on the icon that is downloaded. The installation will then proceed. If you get the Unix source make sure you compile in the tk extension if you want to use IDLE. 1.3 Interactive Mode Go into IDLE (also called the Python GUI). You should see a window that has some text like this: 1 Python 2.5 (#4, Dec 12 2007, 19:19:57) [GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2 Type "copyright", "credits" or "license" for more information. IDLE 0.6 -- press F1 for help >>> The >>> is Python way of telling you that you are in interactive mode. In interactive mode what you type is immediately run. Try typing 1+1 in. Python will respond with 2. Interactive mode allows you to test out and see what Python will do. If you ever feel you need to play with new Python statements go into interactive mode and try them out. 1.4 Creating and Running Programs Go into IDLE if you are not already. Go to File then New Window. In this window type the following: print "Hello, World!" First save the program. Go to File then Save. Save it as ‘hello.py’. (If you want you can save it to some other directory than the default.) Now that it is saved it can be run. Next run the program by going to Edit then Run script. This will output Hello, World! on the *Python Shell* window. Confused still? Try this tutorial for IDLE at [URL="http://hkn.eecs.berkeley.edu/"]http://hkn.eecs.berkeley.edu/[/URL] dyoo/python/idle intro/index.html 1.5 Using Python from the command line If you don’t want to use Python from the command line, you don’t have too, just use IDLE. To get into interactive mode just type python with out any arguments. To run a program create it with a text editor (Emacs has a good python mode) and then run it with python program name. [/QUOTE]
Insert quotes…
Verification
Nawa warak dahaya keeyada? (Namaya wadi kireema dahaya)
Post reply
Top
Bottom