0

Is there a way to associate the character '√' to actually perform the sqrt() function in python?

from math import sqrt

print sqrt(9)
>>> 3.0

print √9
>>> 3.0
will.fiset
  • 1,524
  • 1
  • 19
  • 29
  • I don't, I'm just asking for knowledge. – will.fiset Jul 27 '14 at 15:56
  • 2
    Well, I haven't yet heard of any programming language implementing that (NOT even programming languages for special purposes in science, business etc. like `R`, `Mathematica` etc. Probably because these symbols have to be typed from an image based keyboard. Then that will be like operating a calculator. Standard keyboards are better to do this job. :) Just write `sqrt(9)`. Why go into unnecessary symbol fuss?! Perhaps in future, when symbolic keyboards or touch screen keyboard will invade programming space, we will think about it. – Tanmaya Meher Jul 27 '14 at 16:10
  • I was simply wondering because I have a keyboard which permits such symbols easily: √∛≈²³⁸⁷≠± and thank you for your comment. – will.fiset Jul 27 '14 at 16:24
  • @Caker - That sounds like an interesting keyboard. Is it publicly available? Does it have a manufacturer and/or model name? – Robᵩ Jul 27 '14 at 20:46
  • I configured it that way, it's not a physical keyboard. I created a deadkey which supports some greek symbols and mathematics symbols. – will.fiset Jul 28 '14 at 01:46

0 Answers0