Please enable JavaScript to use CodeHS

Want to receive Question of the Day updates? Subscribe Here

Python Question of the Day Jan. 20, 2025

  1. Incorrect Correct No Answer was selected Invalid Answer

    What code should be added to line 8 to successfully print 28 in the console?

    ## Total Number of Pets at Lawson's Pet Store
    
    def quadrupeds():
        dogs = 2
        cats = 4
        mice = 6
        quads = dogs + cats + mice
        # What code goes here?
    
    def animals():
        quads = quadrupeds()
        fish = 13
        parrots = 3
        total_animals = quads + fish + parrots
        return total_animals
    
    print(animals())
    Python