def fun ():
re_ingresar = True
num_nombres = int(input('cuantos nombres vas a escribir?'))
while (re_ingresar):
nombre = input('escribe un nombre:')
#el output te repite 'escribe un nombre' infinidad de veces,
#pero estoy tratando que sea solo 3 veces osea (num_nombres veces).
What I try is this:
def fun ():
re_ingresar = True
num_nombres = int(input('cuantos nombres vas a escribir?'))
while (re_ingresar):
name = input('escribe un nombre:')
if repeticion == num_nombres #la variable 'repeticion' es un ejemplo y no se me ocurre como encontrarla
#repeticion = numero de veces que la variable name se repite.
re_ingresar = False
My question is: Is it possible to give a value to the variable 'repetition'. If not, what would you advise me?
Thanks in advance.