Basics of python-introduction, Python Programming

Basics of python-introduction

Python is designed for easy interaction between a user and the system. It goes with  an inter­ active function  known as  a shell or listener.  The shell provides a prompt (usually something like »>) and waits for you to type in a Python program or expression. Then it will calculate the expression you given, and print  out the number of the result.  So, for example, a communication with the Python shell might  look like this:


>>> 5 + 5


>>> x = 6

>>> x


>>> x + x


>>> y = 'hi'

>>> y + y




So, you can use Python as a fancy calculator. And as you describe  your  own functions in Python, you may use the shell to check them  or use them  to compute useful  results.


Posted Date: 8/9/2012 6:58:00 AM | Location : United States

Related Discussions:- Basics of python-introduction, Assignment Help, Ask Question on Basics of python-introduction, Get Answer, Expert's Help, Basics of python-introduction Discussions

Write discussion on Basics of python-introduction
Your posts are moderated
Related Questions
Rewrite the program (shown below, or in the Creating Functions section of the tutorial) so that it has separate functions for the perimeter and area of a square, a rectangl

Expressions and assignment We can think of most computer programs as performing some sort of transformation on data.  Our code may get as input the exam scores of everyone in

For this assignment, you are to: 1.    Modify the output format of your Python script from Assignment 1 to match the input format of your C program from Assignment 2. 2.    W

Non-local references So far, whenever we needed to compute a variable, there  was  a binding for that  variable in the 'local' environment (the environment in which  we were e

Variables We cannot  go very far without variables. A variable is a value related to a name that we can bind  to have a particular value  and  then  later use in an expression.

Imagine a "particle" located on the centre square of a two-dimensional grid of dimensions 11 by 75. The particle can only move one square at a time, either up, down, left, or right

Write an algorithm for a program that receives, as input from the user, 2 string variables and 2 integer variables; then joins together and displays the combined strings; and final

For and While   If we want  to do some operation or set of operations various  times, we can handle the process  in several  different types.  The most straightforward types

Every programming language has to have  some method for indicating grouping of operations. Here is how you execute an if-then-else structure in Java:   if (s == 1){ s = s

De?nition   A method de?nition has the abstract form: def ( , ..., ): ...   There are essentially three parts: is a name for