Well, the examples i've seen of @interact allow input at the beginning of a process such as a loop. That's great but my students were making a rock, scissors, paper, lizard, Spock game where they wanted to have a computer player vs a human player. The program needs to stop after every round to ask for input several times for the human player during a typical game. I had them write a simulation instead whereby the human and computer players just used random choices. I think we did "from Random import choice" and in the code we used "choice('rpslk')".

Thanx,
A. Jorge Garcia
Applied Math & CS
Baldwin SHS & Nassau CC
http://shadowfaxrant.blogspot.com
http://www.youtube.com/calcpage2009
Sent from my iPod

On Mar 24, 2011, at 5:56 AM, pang <pablo.ang...@uam.es> wrote:

On 3 mar, 00:27, "A. Jorge Garcia" <calcp...@aol.com> wrote:
Speaking of input, is there anyway to use the input() function from
python in a SAGE notebook cell?

Would @interact work for you?

http://wiki.sagemath.org/interact

--
You received this message because you are subscribed to the Google Groups "sage-edu" group.
To post to this group, send email to sage-edu@googlegroups.com.
To unsubscribe from this group, send email to sage-edu+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/sage-edu?hl=en .


--
You received this message because you are subscribed to the Google Groups 
"sage-edu" group.
To post to this group, send email to sage-edu@googlegroups.com.
To unsubscribe from this group, send email to 
sage-edu+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-edu?hl=en.

Reply via email to