Python 1
Python 1
• VS Code
• https://code.visualstudio.com/
Writing your first code:
print(“Hello, World”)
Interactive Mode
Scriptive Mode
or REPL
Tokens: The smallest fundamental unit of the
program.
def divide_two_numbers(a,
b):
if b == 0:
print(“Zero
Division Error”)
else: print(a/b)
https://docs.python.org/3/library/token.htm
l
Keywords: Reserved words having special
meaning to the language compiler.
False await else import pass
For Example:
Types of Literals:
• String Literals
• Numeric literals
• Floating Literals
• Complex Literals
• Special Literals (None)
Punctuators: Special Symbols that help you
define the structure and syntax of your
code.
Operators: Symbols that operate on
values.
Types of operators:
• ls
• mkdir
• pwd
• cd
• . (Period)
• .. (Double Period)
• rmdir
• clear
• code
• python
Thank you