0% found this document useful (0 votes)
3 views1 page

Python Syntax

The document introduces Python syntax, emphasizing its importance similar to spelling and punctuation in English. It explains how a basic print statement works and the role of the compiler in identifying syntax errors. Additionally, it highlights the use of comments in Python, which are created using the hash sign (#) and serve to annotate code for better understanding.

Uploaded by

mickey
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python Syntax

The document introduces Python syntax, emphasizing its importance similar to spelling and punctuation in English. It explains how a basic print statement works and the role of the compiler in identifying syntax errors. Additionally, it highlights the use of comments in Python, which are created using the hash sign (#) and serve to annotate code for better understanding.

Uploaded by

mickey
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

Python Syntax
a. Now we can get into the Python language. The start of any language is syntax.
Similar to spelling and punctuation in English, Python has some structure and
spelling that needs to be followed. We take a look at a basic print statement and
what happens when the statement is incorrectly written. The compiler (the thing
that checks if the code is written correctly) lets you know if there is a syntax
error. A very useful thing to know is how to make a comment. A comment is a
line of code that is not executed when a program is run. This is very useful for
labeling your work and giving definitions to things so other people can
understand your code. Comments in Python can be made using the number or
hash sign ( # ).

You might also like