Congrats, Rodrigo!
You have gone above and beyond in the three challenges. Please, review the topics bellow on the challenge-2.
Sets
- In the challenge-2, you were required to create a list with 80 random values that should be between 0 and 100 using
random.sample. To do that, you have written the following piece of code: random.sample(range(100),k=80). Please, keep in mind that range(100) creates a list that goes from 0 up to 99 instead of up to 100.
- To check if an element of a set isn't present in another set, you can use the
.difference() method.
- To check if an element of a set is also an element of another set, you can use the
.intersection() method.
- When you are checking if a set is a subset of another, you have misunderstood the order of the sets in the function. Instead of writing
set1.issubset(set3), you should have written set3.issubset(set1). Let me know if you have any questions about it.
Congrats, Rodrigo!
You have gone above and beyond in the three challenges. Please, review the topics bellow on the challenge-2.
Sets
random.sample. To do that, you have written the following piece of code:random.sample(range(100),k=80). Please, keep in mind thatrange(100)creates a list that goes from 0 up to 99 instead of up to 100..difference()method..intersection()method.set1.issubset(set3), you should have writtenset3.issubset(set1). Let me know if you have any questions about it.