Completed 5-5 Alien Colors #3
This commit is contained in:
parent
33fdbb7cf5
commit
01060f8cd4
15
Chapter_05/5-05_alien_colors3.py
Normal file
15
Chapter_05/5-05_alien_colors3.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Exercise 5-5 Alien Colors #3
|
||||||
|
# Learning Objective: Utilize if/elif/else statements, expanding on previous 2 programs.
|
||||||
|
|
||||||
|
# Version 1/2/3 = Alien Color is choosable.
|
||||||
|
|
||||||
|
alien_color = input('What is the alien color?')
|
||||||
|
|
||||||
|
if (alien_color == 'green'):
|
||||||
|
print("\nPlayer has scored 5 points")
|
||||||
|
elif (alien_color == 'yellow'):
|
||||||
|
print("\nPlayer has scored 10 points")
|
||||||
|
elif (alien_color == 'red'):
|
||||||
|
print("\nPlayer has scored 15 points")
|
||||||
|
else:
|
||||||
|
print("\nInvalid Input, please re-run the program!")
|
||||||
Loading…
x
Reference in New Issue
Block a user