numbers =[ ]
for n in range(5):
data=int(input('append(data):'))
numbers.append(data)
print(numbers)
I made the code like this
Makefile:6: recipe for target 'py3_run' failed
make: *** [py3_run] Error 1
File "Main.out", line 5
numbers.append(data):
^
TabError: inconsistent use of tabs and spaces in indentation
an error appears;; what's the problem?
python
This is not a Python problem, but an English reading problem.
TabError: / inconsistent use of tabs and spaces / in indentation
Tab error: / Inconsistent tab and space usage / In indent
Indentation error! Python is very sensitive to dictation, instead of having no concept of braces in other languages. Incorrect indentations result in unintended errors, such as incorrect use of braces in other languages.
Please modify the code as follows:
numbers =[ ]
for n in range(5):
data = int(input('append(data):'))
numbers.append(data)
print(numbers)
© 2024 OneMinuteCode. All rights reserved.