Digital thinking tools for better decision making
Digital thinking tools for better decision making

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

Free course

Digital thinking tools for better decision making

3 The size of a set

Every set has a size: how many members it contains. If a set has been stored in Python, you can find its size using len. For example, here is a set of numbers:

nums = {6, 3, 5, 1, 7, 9, 11, 4}

If you enter this into the Python shell below and then execute

>>> len(nums)

you should get 8.

Active content not displayed. This content requires JavaScript to be enabled.
Interactive feature not available in single page view (see it in standard view).

Euler diagrams are useful for reasoning about the size of sets. For example, consider the set of 52 playing cards in a standard pack (also called a deck). Figure 11 shows two smaller sets – picture cards and hearts – are contained in the overall set of size 52.

Described image
Figure 13 Picture cards and Hearts are sets contained within overall pack

Picture cards are jacks, queens and kings, and there are 12 of these altogether, 3 per suit. There are 13 cards in each suit.

The shaded intersection in Figure 14 represents the picture cards that are also hearts. There are 3 of these.

Described image
Figure 14 Picture cards and Hearts are sets contained within overall pack. There are 3.

You can continue to explore this in the next activity.

Activity 3 Figure it out

Timing: Allow about 5 minutes

The shaded areas in the diagrams below represent, respectively:

  • picture cards that are not hearts
  • hearts that are not picture cards
  • cards that are neither hearts nor picture cards.
Described image
Figure 15 Solution to activity

Using a pen and paper, copy the original Euler diagram and fill in the numbers for each of these regions.

Discussion

Your Euler diagram with the numbers should look like this.

Described image
Figure 16 The intersection of Picture cards and Hearts contains 3 cards.
DTT_1

Take your learning further

Making the decision to study can be a big step, which is why you'll want a trusted University. The Open University has 50 years’ experience delivering flexible learning and 170,000 students are studying with us right now. Take a look at all Open University courses.

If you are new to University-level study, we offer two introductory routes to our qualifications. You could either choose to start with an Access module, or a module which allows you to count your previous learning towards an Open University qualification. Read our guide on Where to take your learning next for more information.

Not ready for formal University study? Then browse over 1000 free courses on OpenLearn and sign up to our newsletter to hear about new free courses as they are released.

Every year, thousands of students decide to study with The Open University. With over 120 qualifications, we’ve got the right course for you.

Request an Open University prospectus371