Challenge: Working with the Command Line

In the Command Line Elements course, you learned how to navigate the filesystem, create and modify files, and other filesystem management features. In the Command Line Python scripting lesson, you learned how to work with Python on the command line. You discovered it isn’t enough just to know how to write code in Python — we also have to know how to modify and execute Python programs on a computer. Knowing how to modify and execute Python programs quickly makes for quick prototyping of a script or developing a sample script before building it out.

In this challenge, you’ll pull all of the concepts from the past few lessons together to create and run a Python script on the command line. Here’s a rough outline of the steps in this exercise:

  • Create a Python script.
  • Create a virtual environment.
  • Change file perlessons.
  • Execute a Python script from the command line.

At Dataquest, we’re huge believers in learning through doing, and we hope this shows in your experience with the lessons. While lessons focus on introducing concepts, challenges allow you to perform deliberate practice by completing structured problems. Challenges will feel similar to lessons, but with little instructional material and a larger focus on exercises.


  • Learn how to create Python scripts from the command line.
  • Learn how to change file perlessons.
  • Learn how to create virtual environments.

Lesson Outline

  1. Introduction
  2. Create a Script
  3. Change File Perlessons
  4. Create a Virtual Environment
  5. Move the Script
  6. Execute the Script

Get started for free

No credit card required.

Or With

By creating an account you agree to accept our terms of use and privacy policy.