Exercises#

After completing the tutorial attempt the following exercises.

If you are not sure how to do something, have a look at the “How To” section.

  1. Obtain the following tuples using the range command:

    1. \((0, 1, 2, 3, 4, 5)\)

    2. \((2, 3, 4, 5)\)

    3. \((2, 4, 6, 8)\)

    4. \(-1, 2, 5, 8\)

  2. By both generating and directly computing obtain the number of the following:

    1. All permutations of \((0, 1, 2, 3, 4, 5)\).

    2. All permutations of \(("A", "B", "C")\).

    3. Permutations of size 3 of \((0, 1, 2, 3, 4, 5)\).

    4. Permutations of size 2 of \((0, 1, 2, 3, 4, 5, 6)\).

    5. Combinations of size 3 of \((0, 1, 2, 3, 4, 5)\).

    6. Combinations of size 2 of \((0, 1, 2, 3, 4, 5)\).

    7. Combinations of size 5 of \((0, 1, 2, 3, 4, 5)\).

  3. A class consists of 3 students from Ashville and 4 from Bewton. A committee of 5 students is chosen at random the class.

    1. Find the number of committees that include 2 students from Ashville and 3 from Bewton are chosen.

    2. In fact 2 students, from Ashville and 3 from Bewton are chosen. In order to watch a video, all 5 committee members sit in a row. In how many different orders can they sit if no two students from Bewton sit next to each other.

  4. Three letters are selected at random from the 8 letters of the word COMPUTER, without regard to order.

    1. Find the number of possible selections of 3 letters.

    2. Find the number of selections of 3 letters with the letter P.

    3. Find the number of selections of 3 letters where the 3 letters form the word TOP.