| 2022-07-11 13:16:04 +0100 | received badge | ● Famous Question (source) |
| 2021-04-23 11:22:24 +0100 | received badge | ● Notable Question (source) |
| 2020-12-19 01:57:58 +0100 | received badge | ● Popular Question (source) |
| 2020-04-26 22:51:48 +0100 | received badge | ● Scholar (source) |
| 2020-04-26 22:51:46 +0100 | received badge | ● Supporter (source) |
| 2020-04-26 22:16:38 +0100 | received badge | ● Student (source) |
| 2020-04-24 21:54:41 +0100 | asked a question | How to ask the user for legal inputs? Suppose we have the following code for the Taylor expansion. Then we will get a Sage Interact. We can change the function e^x to any function of x and get the Taylor expansion. However if we input something like e^y, we will get an error from Sage. Is there some way that we can modify the code so that if someone input something which is not a function of x, it will print "illegal input" instead of returning an error? More generally, if I require the input to be an element of a polynomial ring, for example Q[x,y,z], then how to ask Sage to print "illegal input" if someone input something like t^2. |
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.