Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #66363

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

Newsgroups comp.lang.python
Date 2014-02-14 20:27 -0800
Message-ID <045b1b2d-625c-4499-9fa8-d536b1ec4da4@googlegroups.com> (permalink)
Subject I'm trying to do this code, can somebody help me
From pabloeruggeri@gmail.com

Show all headers | View raw


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()

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

I'm trying to do this code, can somebody help me pabloeruggeri@gmail.com - 2014-02-14 20:27 -0800
  Re: I'm trying to do this code, can somebody help me Chris Angelico <rosuav@gmail.com> - 2014-02-15 15:47 +1100

csiph-web