forked from eyahi/AP-Python-Assignment-MSc-NUN
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuestion 5.py
More file actions
44 lines (37 loc) · 2.82 KB
/
Question 5.py
File metadata and controls
44 lines (37 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
alien_color = 'green' # Create a variable called alien_color and assign it a value of ‘green’
if alien_color == 'green': # If the alien’s color is green
print("You just earned 5 points.") # Print a message that the player just earned 5 points
alien_color = 'red' # Create a variable called alien_color and assign it a value of ‘red’
if alien_color == 'green': # If the alien’s color is green
print("You just earned 5 points.") # Print a message that the player just earned 5 points
alien_color = 'green' # Create a variable called alien_color and assign it a value of ‘green’
if alien_color == 'green': # If the alien’s color is green
print("You just earned 5 points for shooting the alien.") # Print a statement that the player just earned 5 points for shooting the alien
else: # If the alien’s color isn’t green
print("You just earned 10 points.") # Print a statement that the player just earned 10 points
alien_color = 'yellow' # Create a variable called alien_color and assign it a value of ‘yellow’
if alien_color == 'green': # If the alien’s color is green
print("You just earned 5 points for shooting the alien.") # Print a statement that the player just earned 5 points for shooting the alien
else: # If the alien’s color isn’t green
print("You just earned 10 points.") # Print a statement that the player just earned 10 points
alien_color = 'green' # Create a variable called alien_color and assign it a value of ‘green’
if alien_color == 'green': # If the alien is green
print("You earned 5 points.") # Print a message that the player earned 5 points
elif alien_color == 'yellow': # If the alien is yellow
print("You earned 10 points.") # Print a message that the player earned 10 points
else: # If the alien is red
print("You earned 15 points.") # Print a message that the player earned 15 points
alien_color = 'yellow' # Create a variable called alien_color and assign it a value of ‘yellow’
if alien_color == 'green': # If the alien is green
print("You earned 5 points.") # Print a message that the player earned 5 points
elif alien_color == 'yellow': # If the alien is yellow
print("You earned 10 points.") # Print a message that the player earned 10 points
else: # If the alien is red
print("You earned 15 points.") # Print a message that the player earned 15 points
alien_color = 'red' # Create a variable called alien_color and assign it a value of ‘red’
if alien_color == 'green': # If the alien is green
print("You earned 5 points.") # Print a message that the player earned 5 points
elif alien_color == 'yellow': # If the alien is yellow
print("You earned 10 points.") # Print a message that the player earned 10 points
else: # If the alien is red
print("You earned 15 points.") # Print a message that the player earned 15 points