First names

Dessign the function @primers_noms(f, n)@ that returns a list of male
nouns. Function parameters are a list of strings f and a non negative
integer n. The result list must contain the first n male nouns in f. If
there are less than n male nouns the function must return a list with
those male nouns and at the end the string ’i cap mes’.

    def es_nom_de_noi(s):
        return s in ['Albert', 'Antoni', 'Lluis', 'Marc', 
                     'Pere', 'Pol', 'Ramon']

Sample session

Problem information

Author: InfBesos

Generation: 2026-01-25T14:08:49.907Z

© Jutge.org, 2006–2026.
https://jutge.org
