Skip to content

Repository files navigation

Typing SVG

🔥 My Stats:

GitHub Streak

createusersdata

User data. Selecting a name from a list of names, selecting a last name from a list of surnames, calculates the year based on the entered age

Roadmap

  • create_first_name - the function takes three parameters. 1. names - an array of names. 2. gender - two parameters (male, female). 3. nationality - string value in iso2 format

  • create_last_name - 1. names - an array of names. 2. nationality - string value in iso2 format

  • get_year_ago - the function takes one parameter (age). Month and day are given randomly.


Tech Stack

Server: Python 3.9^


Clone this repository

$ gh repo clone komanch7/createusersdata cud-pro
$ cd cud-cli
or
$ git clone https://github.com/komanch7/createusersdata cud-pro
$ cd cud-pro

JSON for data

{"male", "female"}
{
"male": {
"en": [
"Name first",
"..."
]
},
"female": {
"en": [
"Name first",
"..."
]
}
}

Codespaces

Python Code...

# all importsimportcreate_first_nameimportcreate_last_nameimportget_year_ago

Function number 1

# get listfirst_name="first_names.json"# takes three parameters# 1. list with named# 2. string with gender# 3. string with Name nationality (optional)res_first_name=first_name_selection(fisrt_name, gender='male', nationality='us')
print(res_first_name)
  • program response
>>William

Function number 2

# get listlast_name="last_names.json"# takes three parameters# 1. list with named# 2. string with Name nationality (optional), default parameter = 'en'res_last_name=last_name_selection(last_name, nationality='en')
print(res_last_name)
  • program response
>>Berger

Function number 3

# takes one parameter# 1. integer with ageage=18year_ago=get_year_ago(age)
print(year_ago.strftime('%Y'))
  • program response
>>2005

🚀 About Me

  • I'm a beginner in Python development. Thank you for your understanding and support.

License

MIT

About

User data. Selecting a name from a list of names, selecting a last name from a list of surnames, calculates the year based on the entered age

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages