Python Introducing Lists Using Lists Continental

Adrian Trevino
Adrian Trevino
1,318 Points

Not a question rather Feedback and Answer

In Task 2 of Code Challenge: Continental

It would be better to add the following to the instructions of task 2:

Print Continents with letter "A" only AND use an Asterisk (*) in front of each continent.

When actually using the first snippet of code, the answer is technically right but it throws the user into an infinite error. For people who might be a bit newer, it might be frustrating. A little direction would go a long way!

(I know the first task's code is okay to leave in there, just deleted it to clean up the picture)

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]

#technically correct code
for continent in continents:
    if continent[0] == 'A':
        print(continent)

#acceptable code
for continent in continents:
    if continent[0] == 'A':
        print("* " + continent)

Maybe you might be correct, but what happens when you get a client that wants ideas that are too abstract, according to me it's a good practice of the brain to figure some things out by yourself. just my opinion or feedback.

1 Answer

Steven Parker
Steven Parker
201,957 Points

The challenge says "*Output should look similar to.... *" and shows an example with the asterisks. So part of the the challenge is looking at the example and figuring out how to code it to create the correct result.