Skip to content

Commit 2aef6c1

Browse files
authored
Updated docstring in stub to Google docstring standard. (#4153)
1 parent 4f5cc67 commit 2aef6c1

1 file changed

Lines changed: 37 additions & 16 deletions

File tree

exercises/concept/card-games/lists.py

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
def get_rounds(number):
88
"""Create a list containing the current and next two round numbers.
99
10-
:param number: int - current round number.
11-
:return: list - current round and the two that follow.
10+
Parameters:
11+
number (int): The current round number.
12+
13+
Returns:
14+
list: The current round number and the two that follow.
1215
"""
1316

1417
pass
@@ -17,9 +20,12 @@ def get_rounds(number):
1720
def concatenate_rounds(rounds_1, rounds_2):
1821
"""Concatenate two lists of round numbers.
1922
20-
:param rounds_1: list - first rounds played.
21-
:param rounds_2: list - second set of rounds played.
22-
:return: list - all rounds played.
23+
Parameters:
24+
rounds_1 (list): The first rounds played.
25+
rounds_2 (list): The second group of rounds played.
26+
27+
Returns:
28+
list: All rounds played.
2329
"""
2430

2531
pass
@@ -28,9 +34,12 @@ def concatenate_rounds(rounds_1, rounds_2):
2834
def list_contains_round(rounds, number):
2935
"""Check if the list of rounds contains the specified number.
3036
31-
:param rounds: list - rounds played.
32-
:param number: int - round number.
33-
:return: bool - was the round played?
37+
Parameters:
38+
rounds (list): The rounds played.
39+
number (int): The round number.
40+
41+
Returns:
42+
bool: Was the round played?
3443
"""
3544

3645
pass
@@ -39,8 +48,11 @@ def list_contains_round(rounds, number):
3948
def card_average(hand):
4049
"""Calculate and returns the average card value from the list.
4150
42-
:param hand: list - cards in hand.
43-
:return: float - average value of the cards in the hand.
51+
Parameters:
52+
hand (list): The cards in the hand.
53+
54+
Returns:
55+
float: The average value of the cards in the hand.
4456
"""
4557

4658
pass
@@ -49,8 +61,11 @@ def card_average(hand):
4961
def approx_average_is_average(hand):
5062
"""Return if the (average of first and last card values) OR ('middle' card) == calculated average.
5163
52-
:param hand: list - cards in hand.
53-
:return: bool - does one of the approximate averages equal the `true average`?
64+
Parameters:
65+
hand (list): The cards in the hand.
66+
67+
Returns:
68+
bool: Does one of the approximate averages equal the `true average`?
5469
"""
5570

5671
pass
@@ -59,8 +74,11 @@ def approx_average_is_average(hand):
5974
def average_even_is_average_odd(hand):
6075
"""Return if the (average of even indexed card values) == (average of odd indexed card values).
6176
62-
:param hand: list - cards in hand.
63-
:return: bool - are even and odd averages equal?
77+
Parameters:
78+
hand (list): The cards in the hand.
79+
80+
Returns:
81+
bool: Are the even and odd averages equal?
6482
"""
6583

6684
pass
@@ -69,8 +87,11 @@ def average_even_is_average_odd(hand):
6987
def maybe_double_last(hand):
7088
"""Multiply a Jack card value in the last index position by 2.
7189
72-
:param hand: list - cards in hand.
73-
:return: list - hand with Jacks (if present) value doubled.
90+
Parameters:
91+
hand (list): The cards in the hand.
92+
93+
Returns:
94+
list: The hand with Jacks (if present) value doubled.
7495
"""
7596

7697
pass

0 commit comments

Comments
 (0)