Featured resource
2026 Tech Forecast
2026 Tech Forecast

1,500+ tech insiders, business leaders, and Pluralsight Authors share their predictions on what’s shifting fastest and how to stay ahead.

Download the forecast
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
Labs

Reading Time Formatter in Python

Build a small Python command-line utility that converts total reading minutes into decimal hours and an hours-plus-minutes summary. Along the way, you will practice Python input and output, explicit type conversion, arithmetic operators, string formatting, and simple validation with pytest-backed checks.

Lab platform
Lab Info
Level
Beginner
Last updated
Jun 30, 2026
Duration
40m

Contact sales

By clicking submit, you agree to our Privacy Policy and Terms of Use, and consent to receive marketing emails from Pluralsight.
Table of Contents
  1. Challenge

    Introduction

    This lab guides you through a compact Python command-line application that converts a total number of reading minutes into two useful representations: decimal hours and a whole-hours-plus-minutes breakdown. That makes this step the right starting point, because before you write code, you need to understand the project layout and the data flow from user input to printed output. info> This lab experience was developed by the Pluralsight team using an internally developed AI tool. All sections were verified by human experts for accuracy prior to publications. However, content may still contain errors or inaccuracies, and we recommend independent verification.

    To report a problem or provide feedback, click here. Feedback may be used to improve accuracy in accordance with our Privacy Policy.

  2. Challenge

    Collect input and convert it into numeric data

    This step focuses on the earliest stage of most command-line workflows: getting data into the program and making it usable. That makes it the logical next phase, because every later calculation depends on having an input value and converting it into the right type.

  3. Challenge

    Break the time into complete hours and remaining minutes

    This step extends the calculation layer beyond decimal output and into whole-unit breakdowns. It is the natural next phase because once you already have the total minute count as an integer, you can derive more detailed representations from the same source value.

  4. Challenge

    Format the report and wire the application entry point

    This step moves from isolated helpers to the assembled application. That transition matters because real software is not just a collection of functions; it also needs an orchestration layer that decides when each function runs and how their results reach the user.

  5. Challenge

    Add validation and graceful error handling

    This final hands-on step improves reliability and user experience. That makes it the right closing phase, because the program already works for valid input and now needs to handle common mistakes in a controlled way. Run the application to verify the complete reading time workflow.

    1. In the Terminal tab, run the application:

      python3 -m runtime_report.app
      
    2. When prompted, enter a valid number of reading minutes, such as 150.

    3. Confirm that the application displays a reading time report with both the decimal-hour value and the hours-and-minutes breakdown.

    4. Run the application again and enter a blank value or a negative number to confirm that a friendly error message is displayed instead of a Python traceback.

    Congratulations on completing this lab!

About the author

Pluralsight’s AI authoring technology is designed to accelerate the creation of hands-on, technical learning experiences. Serving as a first-pass content generator, it produces structured lab drafts aligned to learning objectives defined by Pluralsight’s Curriculum team. Each lab is then enhanced by our Content team, who configure the environments, refine instructions, and conduct rigorous technical and quality reviews. The result is a collaboration between artificial intelligence and human expertise, where AI supports scale and efficiency, and Pluralsight experts ensure accuracy, relevance, and instructional quality, helping learners build practical skills with confidence.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight