K1ngkai

Untitled

Jul 26th, 2022
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import random
  2.  
  3. tasks= ['task 1','task 2', 'task 3', 'task 4']
  4.  
  5. fulltime = int(input('Please enter how many fulltime employees: '))
  6. parttime = int(input('Please enter how many part time employees: '))
  7.  
  8. count = 0
  9. for employee in range(fulltime):
  10. selected = random.choices(tasks, k=7)
  11. for item in selected:
  12. if item == 'task 1':
  13. count = count + 1
  14. if count > 1:
  15.  
  16. print(f'Employee {employee + 1}',selected)
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment