HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Glossary
  2. /Python and data
  3. /Program (in Python)

What is Program (in Python)?

In short

A program is a list of instructions written in a programming language that the computer follows one after another. A Python program is saved in a file that ends in .py.

In simple words

The computer reads the instructions from top to bottom. A program takes input, such as a number typed by the user, does something with it, and gives output, such as a printed result. The instructions use variables, calculations, decisions and loops. Python is popular in science because short programs can do a lot, and because libraries such as NumPy and Matplotlib are free.

Example

This program prints the area of a circle of radius 333:

It prints 28.27431. The order of operations is the same as in maths: the power first, then the product.

Also searched as: what is a program in python, what is program in python, print(2 + 3 * 4).

Learn it properly

  • Lessons on this topic
  • Test yourself

Related terms

  • Variable (in Python)
  • Function (in Python)

← All glossary terms

Learn it in

  1. Say Hello to Python
  2. Install and Run Python at Home
All lessons on this topic →

Practise

  1. A student saves a program as my first program.py.txt, opens a terminal, types python my…Medium
  2. Write the command that checks the version of Python in a terminal, for (a) Windows with…Easy
  3. A student has an old laptop with Windows 7, 4 gigabytes of memory, and no internet at…Easy
  • Write a program that prints a box of stars, 4 lines tall and 12 characters wide…Medium
  • Quick questions

    1. A student types print("Hi") straight into the terminal, not inside Python, and gets an…Medium
    2. Which of these is a good name for a Python file?Medium
    3. You run python3 card.py in a terminal, and the program uses input(). How do you answer…Medium

    More Python and data terms

    1. Cell (in a Python notebook)
    2. Class and Special Methods (in Python)
    3. Dictionary (in Python)
    4. For Loop
    5. If Statement (in Python)
    6. Import (Python modules and libraries)
    All Python and data terms →

    Try it yourself

    Python labs run in your browser. Type the code, run it and see what happens.

    Open a Python lab