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
Write a program that will take price data for stocks and print it graphically to the screen. Your program should begin by asking the user for the file name. It should then create a

For this assignment, you need to create a program that allows the user to do basic trigonometry functions. First, ask the user if he or she would like to do sine, cosine, or tangen

#Why can''t I cd my Desktop? A minute ago I would open up cmd and it starts in C:\Users\myname but now it''s starting in C:\WINDOWS\system> and I don''t where I am or how to get ou

Booleans   Before we talk about  conditionals, we require  to clarify the Boolean  data  type.  It has two values False and True. Typical statement that have Boolean values

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

Structured assignment Once  we have  tuples and lists, we may use  a nice trick  in assignment expression, based  on the packing and unpacking of tuples. >>> a, b, c = 1, 2

Task This problem creates a list containing names. The list of names will be printed, sorted, printed again in the new sorted order, written to a new output file, and searched. Ca

Programs and Data Object-oriented programming is a popular way  of managing programs, which  groups together data  with  the procedures that  works on them,  thus  facilitatin

Range Very frequently, we will want to iterate through a list of integer values, often as indices.  Python gives a useful function, range, which gives lists of integers. It ma

Perimeter of a polygon Now, let's consider the problem of computing the length  of the perimeter of a polygon. The input is a structure of vertices,  encoded as a list of list