We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
def count_all_stars(galaxies):
total_stars = 0
for stars in galaxies:
total_stars += stars # fix me!
return total_stars
galaxies = [37, 3, 0]
print(count_all_stars(galaxies))
count_all_stars = sum
I'm a beginner, need help.
try this one:
https://python-reference.re...
me to
Need help
use accumulate command
def count_all_stars(galaxies):
total_stars = 0
for stars in galaxies:
total_stars += stars # fix me!
return total_stars