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
You should use for whenever you can, because  it creates  the structure of your  loops clear. Sometimes, however, you require to do an operation various times, but you don't want t

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

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

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

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

Python has  a built-in list data  structure that  is easy  to use  and  incredibly convenient.  So, for that point, you can say >>> y = [1, 2, 3] >>> y[0] 1 >>> y[2]

Write a program that asks the user to enter a number of seconds. The responses of the program will vary depending on the length of seconds: • If the number of seconds is under 60


Programming models Just  as there  are several methods for organizing entire  software systems, there  are  different strategies for formally expressing computational processe

#que 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 cre