Challenge: Print a Partial Collection
Test your knowledge by writing code to print partial elements of a collection.
We'll cover the following
Problem statement
Create a collection containing the words: hello
, bye
, morning
, night
, blue
, green
. Write a loop that outputs every item but stops when the item is "blue"
. It then prints the "See you again!"
message.
Sample input
Get hands-on with 1200+ tech skills courses.