Count business days
Write a Python program to count the working days (Monday to Friday) between two dates. Step-by-step explanation, colour-coded code and real output.
Online Learning Platform
Free tutorials, solved practice problems and interview prep for QA and automation engineers: Python, Playwright, Selenium, SQL, Git and more.
Write a Python program to count the working days (Monday to Friday) between two dates. Step-by-step explanation, colour-coded code and real output.
Write a Python program to add months to a date, clamping to the month's last day. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find the last day of a month. Step-by-step explanation, colour-coded code and real output.
Write a Python program to check whether dates fall on a weekend. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find the weekday of a date. Step-by-step explanation, colour-coded code and real output.
Write a Python program to calculate a person's age on a given date. Step-by-step explanation, colour-coded code and real output.
Write a Python program to count the days between two dates. Step-by-step explanation, colour-coded code and real output.
Write a Python program to find the dates 30 days after and 7 days before a date. Step-by-step explanation, colour-coded code and real output.
Write a Python program to convert the string "15/08/2026 09:30" into a datetime. Step-by-step explanation, colour-coded code and real output.
Write a Python program to print a date in several formats. Step-by-step explanation, colour-coded code and real output.
Write a Python program to create a date and print its year, month, day and weekday. Step-by-step explanation, colour-coded code and real output.
20 Python iterator and generator programs with solutions: iter, next, yield, generator expressions, pipelines, infinite sequences and itertools.
Take free timed mock tests with answers and explanations.