Remove the smallest element from the set, s. If the set is empty, it remains empty.

a. Remove the smallest element from the set, s. If the set is empty, it remains empty.

b. Create a dictionary that maps the first n counting numbers to their squares. Associate the dictionary with the variable squares.

Answer

a. if len(s) > 0: s.remove(min(s))

b. squares = { i:i*i for i in range(n)}

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts