Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 1
- nrs = raw_input("Introdu 3 numere: ").split()
- if all([float(nr) in xrange(1, 11) for nr in nrs]):
- print "Media este %.2f." % sum([float(nr) / 3.0 for nr in nrs])
- else:
- print "Note invalide."
- # 2
- words = raw_input("Introdu cele 3 cuvinte: ").split()
- ind = words.index(words[2])
- if ind == 2:
- print "Away from Bran"
- else:
- print words[0 if ind == 1 else 1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement