if-elif-else structure : If : Language Basics PYTHON examples


PYTHON examples » Language Basics » If »

 

if-elif-else structure


if-elif-else structure



import random

mood = random.randrange(3)

if mood == 0:
    print mood
elif mood == 2:
    print mood
else:
    print "Illegal mood value!."
           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Language Basics
» If