Coventry University Logo
4061CEM - Programming and Algorithms 1
  • Set Data Types
    2

Set Data Types

Before you attempt this activity, it is best that you review lecture video one from week four. You can find the video and slides on the module page.

For this activity you will be using the integrated development environment recommended by the module leader. If you need to set up your development environment, it is recommended that you check out the instructions from activity four of week one.

Are You Struggling?

If you have trouble with any of the tasks or want to check your answers are correct, then please make yourself known to a member of staff.

Task 1

For this task you need to create a set with the name module. The set should be populated with the following details about this module: i.e. the module code, title and leader.

Once this set has been created, you will then need to add to the end of the set the following staff member: Dr Daniel Goldsmith; using an appropriate function. Upon the creation of the set, you will need to provide a solution for the following:

  1. Remove Dr Ian Cornelius and Dr Daniel Goldsmith from the set using an appropriate function
  2. Get the length of the set using an appropriate function

Task 2

Finally, you need to create a second set consisting of just the staff members: Dr Ian Cornelius and Dr Daniel Goldsmith. You are then required to merge the previous set and the newly created staff set using an appropriate function. It is important that the result of the merging should create a new third list.

If you have trouble with this task or want to check your answers are correct, then please make yourself known to a member of staff.