Run Your Quiz
Run your quiz script from the command line
Writing code and entering commands is only available on desktop. Open this page on a larger screen to complete this chapter.
See it in action
You have written code that displays a quiz question with answer options. Now let's run it.
The terminal is a text-based interface where you type commands to control your computer. It is where developers run scripts, install tools, and manage projects.
Real Python programs live in .py files. To run one from the terminal, you use the python command followed by the filename. For example, to run a file called hello.py:
python hello.pypython is the interpreter that processes your code. It executes each line in the file from top to bottom.
Your quiz.py file is already here — it contains the code you wrote in the previous chapters. Run it.
Instructions
Run your quiz script.
- Run
quiz.pywith thepythoncommand.
Interactive Code Editor
Sign in to write and run code, track your progress, and unlock all chapters.
Sign In to Start Coding