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

10

>>> x = 6

>>> x

6

>>> x + x

12

>>> y = 'hi'

>>> y + y

'hihi'

>>>

 

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
Your assignment for the semester will involve the development of a system for drawing trees using the Python programming language and the turtle graphics module (turtle.py). Comple

List Comprehensions   Python has a very nice built-in  facility for doing  many  iterative methods, known as list comprehensions. The basic template is       [

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.

There are three seating categories at a stadium. For a softball game, Class A seats cost $15, Class B seats cost $12, and Class C seats cost $9. Write a program that asks how many

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


simple program using list

Tower of Hanoi game that you can let a player to move discs between the towers using a mouse. Moreover, you are required to do the followings: •Graphically represent any state in t

Displaying random geometric graphs in an uniform square, unit disk, dense rim unit disk, and uniform sphere

Procedure calls When you compute an expression of the form ( ,  ..., )   the Python interpreter treats  this as a procedure call. It will be simpler to talk about