Given a set of conditions and a list of names, write a python programme which will tell you who is on Santa's naughty list and who is on his nice list.
- Clone the repository
- Create a python virtual environment
python3 -m venv env
- Activate the virtual environment
source env/bin/activate
- Install required packages
pip install -r requirements.txt
[
'Ashley Carrabine',
'Shirley Hunter',
'Vanessa Mcintosh',
'Adrienne Wilson',
'Roger Varney',
'Beverly Hudson',
'Brett Jacks',
'Kevin Avery',
'Miranda Grant',
'Linda Askew',
'Sonya Brown'
]
Things that make a name naughty:
- A letter appears more than once in the first name
- Surname is longer than 5 letters
Use the names
library to generate random names. E.g:
import names
list_of_names = [names.get_full_name() for i in range(10)]