summaryrefslogtreecommitdiff
path: root/input_output/script.rst
diff options
context:
space:
mode:
authorNishanth Amuluru2010-10-11 22:44:21 +0530
committerNishanth Amuluru2010-10-11 22:44:21 +0530
commit0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03 (patch)
tree23e39471c705058c10961ff465517a664abbef43 /input_output/script.rst
parentc777a70b51353182bcfadaaff9deb2b9d09cf9a2 (diff)
parent81a76e18a1b11c9565ee198d7ae58bd49d9b3acb (diff)
downloadst-scripts-0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03.tar.gz
st-scripts-0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03.tar.bz2
st-scripts-0bdc27f2da8baa5bf9b8ae34df1ae5a66e856b03.zip
merged
Diffstat (limited to 'input_output/script.rst')
-rw-r--r--input_output/script.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/input_output/script.rst b/input_output/script.rst
index 46eaa7d..e525872 100644
--- a/input_output/script.rst
+++ b/input_output/script.rst
@@ -6,6 +6,12 @@
C -
D -
+.. #. How to print some value
+.. #. How to print using modifiers
+.. #. How to take input from user
+.. #. How to display a prompt to the user before taking the input
+
+
.. Prerequisites
.. -------------
@@ -73,7 +79,7 @@ As you can see, the values of x and y are substituted in place of %2.1f and %d
{{{ Pause here and try out the following exercises }}}
-%% 1 %% What happens when you do print "x is %d y is %f"%(x)
+%% 1 %% What happens when you do ``print "x is %d y is %f" %(x, y)``
{{{ continue from paused state }}}
@@ -172,6 +178,9 @@ prints the string given as argument and then waits for the user input.
{{{ continue from paused state }}}
+.. #[Puneeth: We didn't talk of new-line character till now, did we?]
+.. #[Puneeth: non-programmers might not know?]
+
The trick is to include a newline character at the end of the prompt string.
::