Basic syntax of python language, Basic Computer Science

The Python language has a lot of similarities to Perl, C and Java. Though, there are some specific differences between the languages.
First Python Program:
relative Mode Programming:
Calling up the interpreter exclusive of passing a script file as a parameter brings up the following on time:
$ python
Python 2.5 (r25:51908, Nov 6 2007, 16:54:01)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2
Type "help", "copyright", "credits" or "license" for more info.
The following text you have to type to the right of the Python prompt and push the Enter key:
>>> print "Hello, Python!";
This will generate following result:
Hello, Python!
Script Mode Programming:
Calling up the interpreter by a script parameter starts execution of the script and continues until the script is ended. When the script is ended, the interpreter is no longer active.
Let us write a easy Python program in a script. All python files will have conservatory .So place the following source code in a file.

print "Hello, Python!";
Here we implicit that you have Python interpreter available in /usr/bin directory. Now attempt to run this program as follows:
$ chmod +x # This is to make file executable
$ python
This will generate following outcome:
Hello, Python!
Posted Date: 5/4/2012 9:24:50 AM | Location : United States

Related Discussions:- Basic syntax of python language, Assignment Help, Ask Question on Basic syntax of python language, Get Answer, Expert's Help, Basic syntax of python language Discussions

Write discussion on Basic syntax of python language
Your posts are moderated
Related Questions
QUESTION (i) Write short notes on each of the following: a) Shelf reading b) Joint Fiction Reserve c) London and South-Eastern Library Region d) Document access

I have an assignment i need it to get it done How much would I be charged for that?

What is CAI? Explain its pitfalls.

Finding someone who doesn''t use some aspect of Microsoft Office on a daily basis is difficult. Whether it is Outlook for email,Word for creating and editing documents,or Excel f

Problem 1. Explain the different categories of instructions. Explanation of 4 categories 2. Explain the steps to be followed for the addition of floating point numb

The various systems (computer, software and output devices) that are available have different limitations for output that is cartographic in nature. Some systems are CAD, GIS limit

In view of the fact that processes frequently need to communicate with other processes therefore, there is require for a well-structured interaction, devoid of using interrupts, a

COMPONENTS OF A DIGITAL COMPUTER: A digital computer is an electronic device that receives data, performs arithmetic and logical operations and produces results according to a

One of the facilities that the use of macros provides is the formation of libraries, which are sets of macros which can be included in a program from a different file. The formatio