Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alien=['green','yellow','red']
- if 'green' in alien:
- print("that the player just earned 5 points.")
- if 'red' in alien:
- print("that the player just earned 5 points.")
- if 'yellow' in alien:
- print("that the player just earned 5 points.")
- if 'blue' in alien:
- print("the version that fails will have no output")
- else:
- print("no color")
- #5.4
- print("\n\n\n")
- alien=['green','yellow','red']
- if 'orange' in alien: #not match the color
- print("that the player just earned 5 points.")
- else:
- print("that the player just earned 10 points.")
- if 'red' in alien:
- print("that the player just earned 5 points.")
- if 'yellow' in alien:
- print("that the player just earned 5 points.")
- if 'blue' in alien:
- print("the version that fails will have no output")
- else:
- print("no color")
- #5.6
- #stage of life:
- age = int (input("Enter your age :"))
- if (age<2):
- print("the person is baby.")
- elif(age <= 2 or age<13):
- print("the person is a kid.")
- elif(age<=13 or age<20):
- print("the person is teenager.")
- elif(age<=20 or age<65):
- print("the person is adult.")
- else:
- print("the person is an elder.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement