2.0 KiB
2.0 KiB
Hints
General
1. Tracking Poker Rounds
- Lists in Python may be constructed in multiple ways.
- This function should return a
list.
2. Keeping all Rounds in the Same Place
- Sequence types such as
listsupport common operations. - This function should return a
list.
3. Finding Prior Rounds
- Sequence types such as
listsupport a few common operations. - This function should return a
bool.
4. Averaging Card Values
- To get the average, this function should count how many items are in the
listand sum up their values. Then, return the sum divided by the count.
5. Alternate Averages
- Sequence types such as
listsupport a few common operations. - To access an element, use the square brackets (
<list>[]) notation. - Remember that the first element of the
listis at index 0 from the left-hand side. - In Python, negative indexing starts at -1 from the right-hand side. This means that you can find the last element of a
listby using<list>[-1]. - Think about how you could reuse the code from the functions that you have already implemented.
6. More Averaging Techniques
- Sequence types such as
listalready support a few common operations. - Think about reusing the code from the functions that you just implemented.
- The slice syntax supports a step value (
<list>[<start>:<stop>:<step>]).
7. Bonus Round Rules
- Lists are mutable. Once a
listis created, you can modify, delete or add any type of element you wish. - Python provides a wide range of ways to modify
lists.