def get_sequential_plays() -> int:
    """Get the sequential number of times the player wants to play.

    Returns:
        An integer between and including 1 to 10.
    """
    MINIMUM_TURNS: int = 1
    MAXIMUM_TURNS: int = 10
    while True:
        try:
            # take plays as a float to account for users inputing floats
            # as casting to int() will just truncate an entered float.
            plays = float(
                input("""
How many times would you like to play [1-10]: """))
        except ValueError:
            print("""
You must enter a number, e.g. 1, 5, 8, 9.""")
            continue
        # Test whether plays is a whole number.
        if plays % 1 != 0:
            print("""
You must enter a whole number, e.g. 1, 5, 8, 9.""")
            continue
        # and if plays is a whole number, safely cast to int()
        plays = int(plays)
        if MINIMUM_TURNS <= plays <= MAXIMUM_TURNS:
            return plays
        print("""
The number must be from 1 to 10, e.g. 1, 5, 8, 10""")