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

Strings and Console I/O in Python

Complete a beginner-friendly Python CLI that welcomes a book fair visitor, collects text and numeric input, and prints a readable summary. The lab focuses on strings, console input and output, newline formatting, type conversion with int and float, and simple arithmetic inside small reusable functions.

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

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

    Get oriented with the starter project

    Welcome to the lab. You will complete a small Python console application that turns a few simple building blocks into a polished interactive workflow. 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

    Create static output with strings

    This step focuses on the simplest but most important building block in the lab: text. Before a program can become interactive, it needs readable static output, such as titles, welcome lines, and banners.

  3. Challenge

    Gather text input from the user

    With the banner in place, the next phase is interactivity. This step teaches the core idea that user input enters a Python program as text, and that prompt design affects both usability and program structure.

  4. Challenge

    Parse numeric input and calculate totals

    So far, every value gathered from the user has stayed as text. That works well for names and genres, but quantities and prices need a different treatment because the program must do math with them.

  5. Challenge

    Assemble the final workflow

    The last step brings the application together. Up to this point, you have built small focused helpers for title text, prompts, formatting, parsing, and arithmetic. Now that you've finished the application, it's time to test the complete experience from start to finish.

    Run the application from the Terminal tab:

    python3 app/booth_helper.py
    

    As you interact with the program, verify that it can:

    • Display the book fair banner and welcome message.
    • Prompt for a visitor's name and favorite genre.
    • Show a personalized message based on the visitor's interests.
    • Collect the number of books being purchased and the price per book.
    • Calculate the subtotal correctly.
    • Print a complete visit summary with all the collected information.

    Try a few different inputs and confirm that the final summary reflects the values you entered and that the subtotal is calculated correctly. If everything works as expected, you've successfully completed the 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