What Are Indentation Errors In Python?

preview_player
Показать описание
Indentation errors in Python are the result of a complete lack of indenting on a block of code that needs an indent (such as following an if statement), or a mismatch in indentation within the “indented block” of code. To resolve indentation errors in Python, you just need to ensure that each ‘block’ of your Python code is indented evenly.

This timeline is meant to help you understand what indentation errors in Python are:
0:00 Introduction.
0:06 Meaning of an indentation error in Python.
0:20 Indentation error example in Python.
0:28 How to resolve an indentation error in Python.
2:35 Outro

Follow & Support StudySession:

What is Python and why you should learn Python? Python programming, in particular Python 3, is a growing programming language that is loved by many programmers due to its simple syntax and ease of use. Python allows for relatively easy debugging of your codes and there are many beautiful Python IDE's available for free to make coding more enjoyable. Python is also very popular among Data Scientists and many machine learning applications. Through this video and others like it in our "learn Python" playlist, we here at StudySession hope to provide you with an excellent education for free.
#studysession #learnpython #python
Рекомендации по теме
Комментарии
Автор

My recommended book for learning Python: Python Crash Course, 2nd Edition: A Hands-On, Project-Based Introduction to Programming. 

StudySessionYT
Автор

For me it says indentation error unindent does not match any outer indentation level

MythicLandsWorld
Автор

elif var=='N2':
N2=((D1*N1)/2)
rpm_arrend=round(N2, 1)
print("N2 rpm:", rpm_arrend)

File "<ipython-input-139-9c2cf0f2aff9>", line 39
elif var=='N2':
^
SyntaxError: invalid syntax

pode ajudar?

betinhocr