- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Core Tech
Logical Operators in Python
Build a small Python CLI that evaluates print-shop orders and produces readable status summaries. You will implement reusable condition helpers, combine them with imports, and verify each milestone with focused pytest checks.
Lab Info
Table of Contents
-
Challenge
Introduction
Welcome to the lab. You are working on a small Python command-line application for a print shop that needs to make simple business decisions and present them clearly. 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. -
Challenge
Apply OR Logic to Review Orders
This step introduces the first layer of the application: decision helpers and their initial user-facing output. You will start with review rules, then connect those rules to a report line, and finally print a compact overview from the CLI entry point.
-
Challenge
Combine Conditions with AND
This step expands the application from a single review decision into a richer production workflow. You will implement rules that require multiple conditions to be true, then format those decisions into a combined production line.
-
Challenge
Use NOT and Boolean Flags for Pickup Rules
This step finishes the business-rule layer by handling post-production decisions. You will determine when an order is ready for pickup, when the customer should be notified, and how to present that information as another report line.
-
Challenge
Assemble and Run the Complete CLI Report
This final step turns several small helpers into a complete, working CLI experience. You will first compose the three report lines into a multi-line order summary, then run the full demo workflow over the provided sample data. Now it's time to see your reporting workflow in action!
-
In the Terminal tab, run the application:
python3 main.py -
Review the output and confirm that:
- A review overview is displayed for each sample order
- Each order summary includes the Review, Production, and Pickup status lines
- Multiple order summaries are printed using the provided sample data
Congratulations on completing this lab!
-
About the author
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.