# dictionary: key: option name, value:  maximum score
all_options = {  
                                       # upper section:
           "Ones":            5,
           "Twos":            10,
           "Threes":          15,
           "Fours":           20,
           "Fives":           25,
           "Sixes":           30,
                                        # lower section
           "Three Of A Kind": 30,
           "Four Of A Kind":  30,
           "Full House":      25,
           "Small Straight":  30,
           "Large Straight":  40,
           "Yahtzee":         50,
           "Chance":          30,
           }

# write menu and display maximum points for each option
print("please choose one option of those:")
print("letter  name         max. score")
for number, (name, max_score) in enumerate(all_options.items(), 1): # ➊
    print(f"{number:>2}: {name:<15}  {max_score:>2}")       # ➋
# endless loop until a valid option is choosen
while True:                                                 # ➌
    command = input("Type the number for an option: >>>")
    try:                                                 
        number = int(command)                               # ➍
    except ValueError:
        print("not a number, please try again")
        continue                                            # ➎ 
    if not (1 <= number <= 13):                             # ➏
        print("not a valid number, please try again")
        continue
    option = list(all_options.keys())[number-1]             # ➐
    break
print("you choose to play", option )
