> You can include the following in your program (I often do) if you
> want
> division to operate the way you expect:
>
from __future__ import division
>
Or you can do an explicit float conversion inside your function
if you don't want the import effect.
def f(x,y):
returm float(x)/y
Thi
On Tue, 16 May 2006, Miguel Estrada wrote:
> def function():
> x = int(raw_input("Enter value of x: "))
> y = int(raw_input("Enter value of y: "))
> z = x / y
> print "The value of z is", z, "unit of measurement"
>
>
> Now, say, user input:
>
> x = 200
> y = 1000
>
> The value
Hi there,
I'm new to Python and programming in general.
This is the function I am writing:
def function():
x = int(raw_input("Enter value of x: "))
y = int(raw_input("Enter value of y: "))
z = x / y
print "The value of z is", z, "unit of measurement"
Now, say, user input:
x =