author | Anoop Jacob Thomas<anoop@fossee.in> |
Sat, 18 Dec 2010 12:54:49 +0530 | |
changeset 524 | b602b4dcc87d |
parent 329 | 5c8e88276e1f |
permissions | -rw-r--r-- |
329 | 1 |
Printing a variable:\\ |
2 |
{\ex \lstinline| print x|} |
|
236
33828497b5da
Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
3 |
|
329 | 4 |
Printing with out a new line:\\ |
5 |
{\ex \lstinline| print x, |} |
|
236
33828497b5da
Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
6 |
|
329 | 7 |
Using modifiers while printing:\\ |
8 |
{\ex \lstinline| print "a is \%d b is \%f"\%(a, b)|} |
|
236
33828497b5da
Converted input_output to new template form
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
9 |
|
329 | 10 |
Taking input from user:\\ |
11 |
{\ex \lstinline| x = raw_input()|} |
|
12 |
||
13 |
Display a prompt while taking input:\\ |
|
14 |
{\ex \lstinline| x = raw_input("Type a number: ")|} |
|
15 |