Simple Profile Generator Script in Python - Python Tutorial

Channel:
Subscribers:
11,600
Published on ● Video Link: https://www.youtube.com/watch?v=0d88HKqM-hg



Category:
Tutorial
Duration: 2:57
82 views
5


I can't make proper videos right now, but I am able to upload this tutorial about a simple Profile Generator Script I wrote in Python. :)

#Python #Tutorial

Script:
import random
#'random' is a Python module used to randomize thi;ngs

#This is the code for the Profile Generator

#List of first names
firstNames = ["Adam", "Alan", "Abraham", "Albert", "Amy", "Beth", "Bella", "Ben", "Cameron", "Courtney", "Daryl", "Dylan", "Darla", "Ethan", "Fred", "Gina", "Hannah", "Lachlan", "James"]

#List of last names
lastNames = ["Adams", "Albertson", "Benson", "Cook", "Cinders", "Cold", "Gilbertson", "Hanson", "Hinders", "Ivans", "Jackson", "Johns", "Smith", "Simpson", "Sigma", "Tucson"]

#List of countries
country = ["Australia", "USA", "China", "Ukraine", "Japan", "Germany", "England", "Afghanistan", "Brazil", "Taiwan", "Sudan", "Russia", "Saudi Arabia", "India", "Mexico", "Spain", "Poland", "Zimbabwe", "Pakistan", "Fiji", "New Zealand"]

#List of interests
interests = ["Golfing", "Gaming", "Eating", "Drugs", "Driving", "Running", "Exercising", "Working", "Pizza", "Food", "Fame", "Money", "Smoking", "Talking", "Guns", "Racing", "Ice cream", "Cars", "War", "Cats", "Dogs", "Murder", "Investing", "Cryptocurrency", "NFTs"]

#You can add more lists if you want to add more information to your profiles

#The loop
loop = True

#Number of profiles generated
profiles = 0

#Profiles are generated whilst the loop is true
while loop == True:
#This line separates the profiles
print("---------------")
#First name & last name are randomly selected from the lists
print("Name: " + random.choice(firstNames), random.choice(lastNames))
#Age is randomly selected between 0 & 100
age = random.randint(0, 100)
#Age is converted to string
agestr = str(age)
print("Age: " + agestr)
print("Country of Origin: " + random.choice(country))
#Likes & dislikes are randomly selected from the interests
print("Likes: " + random.choice(interests))
print("Dislikes: " + random.choice(interests))
#After every profile generated, the 'profiles' counter will go up by 1
profiles = profiles + 1
#Once 1000 profiles are generated, the loop will stop, you can change this number though
if profiles == 1000:
loop = False


Music from: bensound.com







Tags:
python
tutorial
omogonix