```python
import random
def generate_name():
first_name = ["张", "李", "王", "刘", "陈", "杨", "赵", "黄", "周", "吴"]
middle_name = ["伟", "芳", "娜", "敏", "静", "丽", "强", "磊", "洋", "艳"]
last_name = ["华", "飞", "鹏", "宇", "浩", "凯", "晨", "雪", "龙", "杰"]
return random.choice(first_name) + random.choice(middle_name) + random.choice(last_name)
def generate_portraits(num):
portraits = []
for _ in range(num):
name = generate_name()
portrait = f"姓名:{name}
年龄:{random.randint(18, 60)}
性别:{random.choice(['男', '女'])}
职业:{random.choice(['教师', '医生', '工程师', '律师', '公务员', '商人', '艺术家', '运动员'])}"
portraits.append(portrait)
return portraits
num = int(input("请输入生成人像的数量:"))
portraits = generate_portraits(num)
for portrait in portraits:
print(portrait)
print("----------")
```
import random
def generate_name():
first_name = ["张", "李", "王", "刘", "陈", "杨", "赵", "黄", "周", "吴"]
middle_name = ["伟", "芳", "娜", "敏", "静", "丽", "强", "磊", "洋", "艳"]
last_name = ["华", "飞", "鹏", "宇", "浩", "凯", "晨", "雪", "龙", "杰"]
return random.choice(first_name) + random.choice(middle_name) + random.choice(last_name)
def generate_portraits(num):
portraits = []
for _ in range(num):
name = generate_name()
portrait = f"姓名:{name}
年龄:{random.randint(18, 60)}
性别:{random.choice(['男', '女'])}
职业:{random.choice(['教师', '医生', '工程师', '律师', '公务员', '商人', '艺术家', '运动员'])}"
portraits.append(portrait)
return portraits
num = int(input("请输入生成人像的数量:"))
portraits = generate_portraits(num)
for portrait in portraits:
print(portrait)
print("----------")
```