Completed 5-4 Alien Colors #2
This commit is contained in:
parent
3a4c454360
commit
33fdbb7cf5
18
Chapter_05/5-04_alien_colors2.py
Normal file
18
Chapter_05/5-04_alien_colors2.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Exercise 5-4 Alien Colors #2
|
||||
# Learning Objective: Utilize an if/else statement
|
||||
|
||||
|
||||
# Runs if block:
|
||||
alien_color = 'green'
|
||||
|
||||
if (alien_color == 'green'):
|
||||
print("\nPlayer just scored 5 points!")
|
||||
else:
|
||||
print("\nPlayer just scored 10 points!")
|
||||
|
||||
# Runs else block:
|
||||
|
||||
if (alien_color != 'green'):
|
||||
print("\nPlayer just socred 10 points!")
|
||||
else:
|
||||
print("\nPlayer just scored 5 points!")
|
||||
Loading…
x
Reference in New Issue
Block a user