Ejemplo 1: generador de nombres aleatorios en Python
import namegenerator
#First Do pip install namegenerator
#The Import it
print (namegenerator.gen())
Ejemplo 2: Python generador de nombres aleatorios
import random
import time
print('WARNING: If you want less than 10 names, too bad you cant. Just lower the name count.')
name1 = input('please enter the first name: ')
print(' ')
name2 = input('please enter the second name: ')
print(' ')
name3 = input('please enter the third name: ')
print(' ')
name4 = input('please enter the fourth name: ')
print(' ')
name5 = input('please enter the fith name: ')
print(' ')
name6 = input('please enter the sixth name: ')
print(' ')
name7 = input('please enter the seventh name: ')
print(' ')
name8 = input('please enter the eighth name: ')
print(' ')
name9 = input('please enter the nineth name: ')
print(' ')
name10 = input('please enter the tenth name: ')
print(' ')
Name_list = [name1, name2, name3, name4, name5, name6, name7, name8, name9, name10]
def ask():
global start
print(' ')
start = input('plese enter y to continue: ')
print(' ')
ask()
if(start == 'y'):
print('Generating...')
time.sleep(1.25)
print(' ')
print('Generated!')
print(' ')
print('Random Name Generated: ')
print(random.choice(Name_list))
print(' ')
elif(start != 'y'):
print(' ')
ask()
print(' ')
Ejemplo 3: Python generador de nombre y apellido
sudo pip install names
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)