Advertisement
TristanSld

if, elif and else statements in conditional expressions

Jan 5th, 2014
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*-coding:utf-8-*-
  3. meyve=raw_input("Bir meyve adı yazınız: ")
  4. if meyve=="elma":
  5.     print "elma bir meyvedir"
  6. elif meyve=="armut":
  7.     print "armut bir meyvedir"
  8. elif meyve=="kiraz":
  9.     print "kiraz bir meyvedir"
  10. elif meyve=="kabak":
  11.     print "kabak bir meyve değildir"
  12. else:
  13.     print "%s dediğiniz şeyin ne olduğunu bilmiyorum" %meyve
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement