欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

非诚勿扰

程序员文章站 2022-07-14 12:21:03
...
#1.sex(性别) 2.city(工作地区) 3.age(年龄)(20--58) 4.high(身高)(165--180) 5.education background(学历)(本科--硕士) 6.single(单身状况)
# 7.salary(收入)(2000——100000) 8.name(姓名)

import random
nametext = "吕布,刘备,貂蝉,赵云,张飞,曹操,小乔,大乔,孙策,孙权,诸葛帅"
name = nametext.split(",")
Choicename = name[int(random.random()*len(name))]
print(Choicename)
citytext = "自贡 广汉 上海 泸州 西昌 资阳 广元 巴中"
city = citytext.split(" ")
Choicecity = city[int(random.random()*len(city))]
print(Choicecity)
sexText = [0,1]#1代表男 0代表女
Choicesex = sexText[random.randint(0, 1)]
Choiceage = random.randint(20, 50)
print(Choicesex)
Choicesalary = random.randint(2000, 100000)
print(Choicesalary)
eduction = ["本科","研究生","硕士","大专"]
Choiceeduction = eduction[random.randint(0,3)]
print(Choiceeduction)

非诚勿扰