money = 10000
for i in range(1, 21):
import random
score = random.randint(1, 10)
if score < 5:
print(f"员工{i},绩效{score}低于5,不发工资")
continue
elif money < 1000:
print("公司没钱,工资不发")
break
else:
money -= 1000
print(f"员工{i},满足条件发放工资1000元,公司余额{money}")
Python:给员工发工资小游戏
最新推荐文章于 2024-09-27 14:54:48 发布