diff --git a/Day2/Day-2 Notes.txt b/Day2/Day-2 Notes.txt deleted file mode 100644 index d7b0f1e..0000000 --- a/Day2/Day-2 Notes.txt +++ /dev/null @@ -1,66 +0,0 @@ -Token: -------- -token is nothing but small unit of the program -*the small unit of the program is called token. When python reads the code first it will breaks in into smaller uints. -In Python, a token is the smallest meaningful unit of a program. When Python reads your code, it first breaks it into tokens before parsing and executing it. -For example, in this code: - -THINGS IN TOKEN: - 1. IDENTIFIER - 2. OPERATERS - 3. LITERALS - 4. KEYWORDS - 5. PUNCTUATIONS - -EXAMPLE: -x = 10 + 5 - -DIVIDES INTO SMALLER UNITS: -| Token | Type | -| ----- | -------------------------- | -| `x` | Identifier (variable name) | -| `=` | Operator | -| `10` | Literal (integer) | -| `+` | Operator | -| `5` | Literal (integer) | - -Identifier: identifier means the name of variable, function and class -Operaters: operaters means arthematic, logical, etc -literals: the values of the identifier - -COMMENTS: -comments are used to understand the code and it helps to understand by others -1.single line comments: -# this is single line comment - -2.multi-line comment: -''' -this is multi-line comment -''' - -KEYWORDS: -Keywords are reserved words in Python that have predefined meanings. They are part of Python's syntax, so you cannot use them as variable names, function names, or class names. - -There are 35 keywords are there: -['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', - 'def', 'del', 'elif', 'else', 'except','finally', 'for', 'from', 'global', 'if', 'import', 'in', -'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield'] - - - - - - - - - - - - - - - - - - - diff --git a/Day2/Day-2.py b/Day2/Day-2.py deleted file mode 100644 index e18c5ee..0000000 --- a/Day2/Day-2.py +++ /dev/null @@ -1,4 +0,0 @@ -import keyword -print(keyword.kwlist) -print(len(keyword.kwlist)) -print(keyword.softkwlist) diff --git a/Day2/variable_operations.py b/Day2/variable_operations.py deleted file mode 100644 index 97cb4ab..0000000 --- a/Day2/variable_operations.py +++ /dev/null @@ -1,36 +0,0 @@ -Python 3.14.5 (tags/v3.14.5:5607950, May 10 2026, 10:43:50) [MSC v.1944 64 bit (AMD64)] on win32 -Enter "help" below or click "Help" above for more information. - -======= RESTART: C:/Users/Admin/Desktop/python_course_work/Day2/Day-2.py ======= -['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield'] - -======= RESTART: C:/Users/Admin/Desktop/python_course_work/Day2/Day-2.py ======= -['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield'] -35 ->>> -======= RESTART: C:/Users/Admin/Desktop/python_course_work/Day2/Day-2.py ======= -['False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'yield'] -35 -['_', 'case', 'match', 'type'] ->>> a = 10 ->>> a -10 ->>> a=b=c=10 ->>> a -10 ->>> b -10 ->>> c -10 ->>> a,b,c = 10,20,30 ->>> a -10 ->>> print(a,b,c) -10 20 30 ->>> a = 10 ->>> b = 50 ->>> a,b = b,a ->>> a -50 ->>> b -10