Python Programming for Beginners: Python Syntax

Python Install Many PCs will have python already installed. To check if you have python installed on a Windows PC, search in the start bar for Python or run the following on the Command Line (cmd.exe):

Command
C:\Users\Your Name>python --version

If you find that you do not have Python installed on your computer, then you can download it for free from the following website: https://www.python.org/ or You can use onlineGDB

Python Variables

In Python, variables are created when you assign a value to it:

Variables
x = 10
y = "Hello, World!"

Comments

Python has commenting capability for the purpose of in code documentation.

Single line Comments start with a #, and Python will read the rest of the line as a comment:

Comments
#This is a comment.
print("Hello, World!")

Post a Comment

0 Comments