You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-ZeroDivisionError: The operation you are trying to perform isnot possible because you are dividing by zero. Division
104
+
by 0isnot allowed
105
+
106
+
-EOFError: Compiler hits the End of File and we are trying to use the input() function and we are not allowed to because
107
+
of the placement of it.
108
+
109
+
-FloatingPointError: I am performing an invalid operation with a floating data type value.
110
+
111
+
-ImportError: The module you are trying to import does not exist
112
+
113
+
-IndentationError: You are indenting and shouldn't be
114
+
115
+
-IndexError: You are trying to access an invalid index
116
+
L1= [1,2,3]
117
+
L1[3]
118
+
119
+
-KeyboardInterrupt: When I hit CTRL+C shortcut ordel key to interrupt the program I am running.
120
+
121
+
-KeyError: You are trying to access a key that is non-existant within a dictionary aka key-value pair
122
+
123
+
-MemoryError: We have performed n number of operations and they have used up all our memory.
124
+
125
+
-ModuleNotFoundError: You are trying to import a module that doesn't exist
126
+
127
+
-NameError: This is raised whenever you try to use a variable that you have not defined yet locally or globally.
128
+
129
+
-OSError: A System operation was performed and it triggered a system-related error.
130
+
131
+
-OverflowError: The arithmetic operation is too large for the declared data type we are performing with.
132
+
133
+
We can overcome errors by using conditionals: try-except block, ifelse statement, while loop
134
+
135
+
-RuntimeError: Error that is raised does not have any category
136
+
137
+
-StopIteration: Caused when calling the next() method within a for loop and there is no subsequent element to iterate through.
138
+
We have reached and the end and within our code we either have notset the limit in our for loop or the limit is too high for the number of elements we are iterating through.
139
+
140
+
- Syntax Error: You have a typo or are misusing a statement/reserved keyword correctly for example:
141
+
```python
142
+
whileTrue
143
+
print('MY NAME IS OMAR')
144
+
```
145
+
146
+
The above line of code will error because I am missing a colon.
147
+
It should be:
148
+
```python
149
+
whileTrue:
150
+
print('MY NAME IS OMAR')
151
+
```
152
+
153
+
-SystemError: When the interpreter detects an internal error
154
+
155
+
-SystemExit: When you called the sys.exit() function this is triggered
156
+
157
+
-TabError: You have indented too much and must dedent a places back. Or You must indent. It is parallel with spaces.
158
+
159
+
-TypeError: This is raised whenever you try to perform an operation with two non-identical datatypes.
160
+
161
+
The compiler will raise an error telling you you cannot convert the 2nd datatype to the first datatype.
162
+
163
+
-UnboundLocalError: You are trying to access a local variable which isnot defined aka does not exist
164
+
165
+
-UnicodeError: Unicode Encoding/Decoding Error is taking place
166
+
167
+
-ValueError: When you passin a value into a function to perform a computation. The value is the correct data type but of incorrect value
0 commit comments