Setting the Path

On Windows Plateform, you can set the path as:

set path=%path%;C:\python37

Typing an end-of-file character (Control-D on Unix, Control-Z on Windows) at the primary prompt causes the interpreter to exit with a zero exit status. If that doesn’t work, you can exit the interpreter by typing the following command: quit()

Interactive Mode

primary prompt : when you start python prompt that appear is >>> Secondary Prompt : … for continuous lines secondary prompt is … (three dots.

>>> # this is primary prompt

>>> the_world_is_flat = True

>>> if the_world_is_flat:

    print(“Hi, Be careful!”)

…   # this is secondary prompt

Hi, Be careful!

Primary and Secondary Prompt


In python input and are distinguished by the presence or absence of prompts (>>> and …)

Primary Prompt: In python three greater than symbols are the primary prompt, this is where you write the commands.

Secondary Prompt: In Python the secondary prompt (…) on a line by itself in an example means you must type a blank line; this is used to end a multi-line command.

Output Lines: Any line that begins without any prompt is the output line in Python.

Comments in Python

A # character before a line is a comment

If # appear in between a string then it is part of string

Prompts and Comment

error: Content is protected !!