View Single Post
Old Jan 30th, 2007, 5:52 AM   #5
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by kurt View Post
I was hoping there's something like:

Gone = energy * 50%
Nope, unless you create a function to do it:
def pc(x): return x / 100.0

gone = energy * pc(50)
Or
pc = 0.01

gone = energy * 50*pc
The problem is that % is already the modulus operator, so it can't also be used for percentages.
Arevos is offline   Reply With Quote