Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Attendance Summary Report | Automating HR Workflows
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for HR Specialists

bookChallenge: Attendance Summary Report

In your HR automation journey so far, you have explored how to work with lists of employee data and how to automate simple attendance tasks. Comparing lists is a fundamental skill: you often need to determine which employees are present, absent, or require follow-up. When generating reports, this typically means cross-referencing a master list (such as all employee IDs) against a list of those who have checked in or been marked present on a given day. Automating this process saves time and reduces errors, ensuring your attendance records are always up to date.

12345678
all_employee_ids = ["E101", "E102", "E103", "E104", "E105"] present_today = ["E101", "E104", "E105"] for emp_id in all_employee_ids: if emp_id in present_today: print(emp_id, "is present") else: print(emp_id, "is absent")
copy

When formatting your attendance summary, clarity is key. Consider grouping present and absent employees into separate lists or sections, and use clear headings like Present Employees and Absent Employees. This makes it easy for managers or HR staff to quickly review attendance status and take any necessary action. Using consistent spacing and line breaks between sections also improves readability.

Завдання

Swipe to start coding

Write a script that prints two lists: one of present employees and one of absent employees, based on the provided data.

  • Create a list of present employees by checking which IDs from all_employee_ids are in present_today.
  • Create a list of absent employees by checking which IDs from all_employee_ids are not in present_today.
  • Print a header "Present Employees:" followed by the list of present employees.
  • Print a header "Absent Employees:" followed by the list of absent employees.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 7
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Can you show me how to group present and absent employees into separate lists?

How can I format the attendance summary with clear headings?

What are some best practices for making attendance reports more readable?

close

bookChallenge: Attendance Summary Report

Свайпніть щоб показати меню

In your HR automation journey so far, you have explored how to work with lists of employee data and how to automate simple attendance tasks. Comparing lists is a fundamental skill: you often need to determine which employees are present, absent, or require follow-up. When generating reports, this typically means cross-referencing a master list (such as all employee IDs) against a list of those who have checked in or been marked present on a given day. Automating this process saves time and reduces errors, ensuring your attendance records are always up to date.

12345678
all_employee_ids = ["E101", "E102", "E103", "E104", "E105"] present_today = ["E101", "E104", "E105"] for emp_id in all_employee_ids: if emp_id in present_today: print(emp_id, "is present") else: print(emp_id, "is absent")
copy

When formatting your attendance summary, clarity is key. Consider grouping present and absent employees into separate lists or sections, and use clear headings like Present Employees and Absent Employees. This makes it easy for managers or HR staff to quickly review attendance status and take any necessary action. Using consistent spacing and line breaks between sections also improves readability.

Завдання

Swipe to start coding

Write a script that prints two lists: one of present employees and one of absent employees, based on the provided data.

  • Create a list of present employees by checking which IDs from all_employee_ids are in present_today.
  • Create a list of absent employees by checking which IDs from all_employee_ids are not in present_today.
  • Print a header "Present Employees:" followed by the list of present employees.
  • Print a header "Absent Employees:" followed by the list of absent employees.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 7
single

single

some-alt