python generate random name code example

Example 1: random name generator in python

import namegenerator
#First Do pip install namegenerator 
#The Import it
print (namegenerator.gen())

Example 2: random name generator python

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(' ')