Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

Python Question of the Day May 14, 2025

  1. Incorrect Correct No Answer was selected Invalid Answer

    What code needs to be added to line 6 so that this program prints out ['tulips!', 'bluebells!', 'foxglove!', 'peonies!']

    def spring_time(my_list):
        spring_list = []
        for flower in my_list:
            flower = flower + "!"
            spring_list.append(flower)
        # what code goes here?
    
    flowers = ["tulips", "bluebells", "foxglove", "peonies"]
    flowers = spring_time(flowers)
    print(flowers)
    Python