I'm trying to do this code, can somebody help me

pabloeruggeri at gmail.com pabloeruggeri at gmail.com
Sat Feb 15 05:27:45 CET 2014


1)Given the variables  x , y , and z , each associated with an int , write a fragment of code that assigns the smallest of these to min

this is what I have

def main():


 x = eval ( input ("dame el numero X"))
 y = eval ( input ("dame el numero Y"))
 z = eval ( input ("dame el numero Z"))
  
 if(x>y and z>y):
  min=y
  print(min)
 else:
  if(y>x and z>x):
    min=x
    print(min)
  else:
   min=z
   print(min)

main()




More information about the Python-list mailing list