Interested in buying ad space on this blog?
You can, on BuySellAds.com

Do you train Kung Fu?
Or know someone who does?
Then check out KungFuPeople.com
Mobile version of this page|
You searched for keyword:integers |
found 0 photos and 2 blogs in and 0 blog comments in 0.00 seconds |
Blogs |
|
|
|
Interesting float/int casting in Python - 25th of April 2006 Casting is when you convert a variable value from one type to another. This is, in Python, done with functions such as |
|
|
Calculator in Python for dummies - 17th of December 2007 I need a mini calculator in my web app so that people can enter basic mathematical expressions instead of having to work it out themselfs and then enter the result in the input box. I want them to be able to enter "3*2" or "110/3" without having to do the math first. I want this to work like a pocket calculator such that def safe_eval(expr, symbols={}):
return eval(expr, dict(__builtins__=None), symbols) def calc(expr): return safe_eval(expr, vars(math)) assert calc('3*2')==6 assert calc('12.12 + 3.75 - 10*0.5')==10.87 assert calc('110/3')==36 |

