Advertisement
cmiN

wit1

Jun 14th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. # 1
  2. nrs = raw_input("Introdu 3 numere: ").split()
  3. if all([float(nr) in xrange(1, 11) for nr in nrs]):
  4.     print "Media este %.2f." % sum([float(nr) / 3.0 for nr in nrs])
  5. else:
  6.     print "Note invalide."
  7.  
  8. # 2
  9. words = raw_input("Introdu cele 3 cuvinte: ").split()
  10. ind = words.index(words[2])
  11. if ind == 2:
  12.     print "Away from Bran"
  13. else:
  14.     print words[0 if ind == 1 else 1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement