Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

How to write and run your very first program

Sumit Rawal answered on May 8, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • how to write your first python program
  • programming language which complies first before running is called

  • How to write and run your very first program

    0

    It is now time to write and run your first Python 3 program. It will be very simple, for now.

    The first step is to create a new source file and fill it with code. Click File in the IDLE menu and choose New file.

    Python 3.7.0 Shell - New File

    As you can see, IDLE opens a new window for you. You can use it to write and amend your code.

    This is the editor window. Its only purpose is to be a workplace in which your source code is treated. Do not confuse the editor window with the shell window. They perform different functions.

    The editor window is currently untitled, but it's good practice to start work by naming the source file.

    Click File (in the new window), then click Save as..., select a folder for the new file (the desktop is a good place for your first programming attempts) and chose a name for the new file.

    Python 3.7.0 Shell - Saving a new file: snake.py

    Note: don't set any extension for the file name you are going to use. Python needs its files to have the .py extension, so you should rely on the dialog window's defaults. Using the standard .py extension enables the OS to properly open these files.

    Popularity 1/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Tags: whatever
    Link to this answer
    Share Copy Link
    Contributed on May 08 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.