author | Nishanth <nishanth@fossee.in> |
Tue, 12 Oct 2010 11:26:09 +0530 | |
changeset 334 | 4b1e81da1c80 |
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 |