Exercises
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.
Obtain the following tuples using the
range
command:\((0, 1, 2, 3, 4, 5)\)
\((2, 3, 4, 5)\)
\((2, 4, 6, 8)\)
\(-1, 2, 5, 8\)
By both generating and directly computing obtain the number of the following:
All permutations of \((0, 1, 2, 3, 4, 5)\).
All permutations of \(("A", "B", "C")\).
Permutations of size 3 of \((0, 1, 2, 3, 4, 5)\).
Permutations of size 2 of \((0, 1, 2, 3, 4, 5, 6)\).
Combinations of size 3 of \((0, 1, 2, 3, 4, 5)\).
Combinations of size 2 of \((0, 1, 2, 3, 4, 5)\).
Combinations of size 5 of \((0, 1, 2, 3, 4, 5)\).
A class consists of 3 students from Ashville and 4 from Bewton. A committee of 5 students is chosen at random the class.
Find the number of committees that include 2 students from Ashville and 3 from Bewton are chosen.
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.
Three letters are selected at random from the 8 letters of the word
COMPUTER
, without regard to order.Find the number of possible selections of 3 letters.
Find the number of selections of 3 letters with the letter
P
.Find the number of selections of 3 letters where the 3 letters form the word
TOP
.