From 01060f8cd46de848c7b7bc97f03a6a102d72c37e Mon Sep 17 00:00:00 2001 From: cheeks <134818917+leftovertoast@users.noreply.github.com> Date: Wed, 22 Jan 2025 16:12:29 -0500 Subject: [PATCH] Completed 5-5 Alien Colors #3 --- Chapter_05/5-05_alien_colors3.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Chapter_05/5-05_alien_colors3.py diff --git a/Chapter_05/5-05_alien_colors3.py b/Chapter_05/5-05_alien_colors3.py new file mode 100644 index 0000000..59bd8c9 --- /dev/null +++ b/Chapter_05/5-05_alien_colors3.py @@ -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!") \ No newline at end of file