x = 1
y = 3
z = 10
print "Given " ,x,y,z,"\n"
x = x + y
print "x = x + y assigns " + str(x) + "to x\n"
x = 1
x += y
print "x += y assigns " + str(x) + "to x\n"
x = 1
z = z * x + y
print "z = z * x + y assigns" + str(z) + "to z\n"
z = 10
z = z * (x + y)
print "z = z * (x + y) assigns" + str(z) + "to z\n"
z = 10
z *= x + y
print "z *= x + y assigns" + str(z) + "to z\n"
#there is no concept of pre-increment or post-increment in Python.
w=x=y=z=1
print "Given w = ",w,"x = ",x,"y = ",y,"z = ",z,"\n"
w+=1
result=w
print "++w evaluates to " ,result,"and w is now ",w,"\n"
result = x
x = x + 1
print "x++ evaluates to ",result," and x is now ",x,"\n"
y-=1
result = y
print "--y evaluates to ",result," and y is now ",y,"\n"
result = z
z -= 1
print "z-- evaluates to ",result," and z is now ",z,"\n"
x = 7
y = 25
z = 24.46
print "Given x = ",x,"y = ",y," and z = ",z,"\n"
print "x >= y produces: ",x >= y,"\n"
print "x == y produces: ",x == y,"\n"
print "x < z produces: ",x < z,"\n"
print "y > z produces: ",y > z,"\n"
print "x != y - 18 produces: ",x != y - 18,"\n"
print "x + y != z produces: ",x + y != z
x = 7
y = 5
print "Given x = ",x,"y = ",y,"\n"
print "x / y produces: ",x/y,"\n"
print "(float)x / y produces: ", float(x)/y