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
A program to count how many files are on the file system which displays summary information regarding the total number of bytes used by all files and a breakdown of the number of b

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

Your task is to construct a translator from the subset of Python in Project 3 intocontinuation-passing style (CPS). Of course, the expected way of accomplishing this is to trans

1)    Write a python programmecomparing for and while loops like the following. Math Times table For Loop: 2x1=2 2x2=4 ..... 2x12=24 While Loop: 3x1=3 3x

The goal of this exercise is to write a \business phrase" generator, which each time it is called produces lines of business speak, such as: It's time that we became uber-effici

In Python, the fundamental abstraction of a computation is as a procedure (other  books call them "functions" instead; we will end  up  using  both  values).   A function that  tak

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


Non-local references in procedures There  is an important subtlety in the  way  names  are handled in the  environment created by a function call. When  a value  that  is not

#question.Program 10 Assignment (Banking Objects – Savings/Checking Accounts) Create a program named 10.py that performs the following: Create a class named ChkAcct, and a class n