| 1 | initial version |
This is not really a Sage question. Anyway, use input in python.
In [1]: a = input('Enter number: ')
Enter number: 10
In [2]: a
Out[2]: 10
In [3]: a = input('Enter string')
Enter string: 'test'
In [4]: a
Out[4]: 'test'
In the sage notebook you can use the @interact decorator. See examples of it here.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.