Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/window.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-08-24 20:09:45 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-08-24 20:09:45 (GMT)
commitd388ee6e7c49714a23a32d0833a58009aa673b02 (patch)
treed8dc79750920ffe72c5747ddca2b0e938bdb0147 /window.py
parentb1b1825e259fe7b4309ce6b50f8856517c4b3a51 (diff)
show different operand orders in results
Diffstat (limited to 'window.py')
-rw-r--r--window.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/window.py b/window.py
index c425833..f9b3e8f 100644
--- a/window.py
+++ b/window.py
@@ -226,23 +226,33 @@ class SlideRule():
if self.slider_on_top == 'A':
# calculate the values for D, A, and D * A (under the redicule)
s = " √ " + str(self._calc_A()) + " = " + \
- str(self._calc_DA() * self.factor)
+ str(self._calc_DA() * self.factor) + \
+ "\t\t" + str(self._calc_DA() * self.factor) + "² = " + \
+ str(self._calc_A())
elif self.slider_on_top == 'L':
# calculate the values for L2, L, and L2 + L (under the redicule)
if self._calc_L() < 0:
s = str(self._calc_L2()) + " – " + str(-self._calc_L()) + \
- " = " + str(self._calc_LL())
+ " = " + str(self._calc_LL()) + "\t\t" + \
+ str(self._calc_LL()) + " + " + str(-self._calc_L()) + \
+ " = " + str(self._calc_L2())
else:
s = str(self._calc_L2()) + " + " + str(self._calc_L()) + \
- " = " + str(self._calc_LL())
+ " = " + str(self._calc_LL()) + "\t\t" + \
+ str(self._calc_LL()) + " – " + str(self._calc_L()) + \
+ " = " + str(self._calc_L2())
elif self.slider_on_top == 'CI':
# calculate the values for D, CI, and D / CI (under the redicule)
s = str(self._calc_D()) + " / " + str(self._calc_CI()) + " = " + \
- str(self._calc_DC()/10 * self.factor)
+ str(self._calc_DC()/10 * self.factor) + "\t\t" + \
+ str(self._calc_DC()/10 * self.factor) + " × " + \
+ str(self._calc_CI()) + " = " + str(self._calc_D())
else:
# calculate the values for D, C, and D * C (under the redicule)
s = str(self._calc_D()) + " × " + str(self._calc_C()) + " = " + \
- str(self._calc_DC() * self.factor)
+ str(self._calc_DC() * self.factor) + "\t\t" + \
+ str(self._calc_DC() * self.factor) + " / " + \
+ str(self._calc_C()) + " = " + str(self._calc_D())
if self.sugar is True:
self.activity.results_label.set_text(s)
self.activity.results_label.show()