2018-11-20 10:47:28 -0500 | commented answer | Evaluate from string an equation that has integer division I'm using |

2018-11-20 10:45:13 -0500 | commented answer | Evaluate from string an equation that has integer division I put the sentence |

2018-11-20 10:44:54 -0500 | answered a question | Evaluate from string an equation that has integer division I put the sentence |

2018-11-20 10:20:40 -0500 | received badge | ● Editor |

2018-11-20 10:18:50 -0500 | answered a question | Converting strings into expressions Well, but this does no work for the following case.
I want to define an equation from a string, by changing the value of If I follow the suggested construction like I get the Error Message In other words, and referring to the first question, How about an expression like |

2018-11-19 11:11:45 -0500 | received badge | ● Autobiographer |

2018-11-19 11:07:42 -0500 | received badge | ● Scholar (source) |

2018-11-18 12:49:37 -0500 | received badge | ● Student (source) |

2018-11-18 12:09:33 -0500 | asked a question | Evaluate from string an equation that has integer division I have the following Python list that contains strings of equations. You can see that all of the equations have integer division. Because this is obtained by some program, I can not edit the strings. When I evaluate for It gives And should be give Of course I can solve this by modifying MANUALLY the strings of the equations by indicating that the denominator is a real number and not an integer (I put a decimal point at the end of the integer in the denominator) as following. But this is not the idea, the strings of the equations are generated automatically and one can not modify by editing manually, because it will be implemented in a process where it should be create at least 2000 equations. Is there some elegant solution for this? --Many thanks! |

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.