A soft-drink acid sum. What does this print? atomic = {"H": 1.008, "P": 30.97, "O": 16.00}; f = {"H": 3, "P": 1, "O": 4}; print(round(sum(atomic[e] * n for e, n in f.items()), 2))
atomic = {"H": 1.008, "P": 30.97, "O": 16.00}; f = {"H": 3, "P": 1, "O": 4}; print(round(sum(atomic[e] * n for e, n in f.items()), 2))
Log in to join the discussion.
Loading…