The indentation at the same level must be consistent, and a colon must be added after the conditional judgment. In addition, it is better to use elif directly. There is no need to nest another one to reduce execution efficiency.
I suggest you watch the 600-episode tutorial of Dark Horse Programmer at Station B. That one is more detailed and standardized. The one by Little Turtle is not suitable for pure beginners.
The indentation at the same level must be consistent, and a colon must be added after the conditional judgment. In addition, it is better to use elif directly. There is no need to nest another one to reduce execution efficiency. I suggest you watch the 600-episode tutorial of Dark Horse Programmer at Station B. That one is more detailed and standardized. The one by Little Turtle is not suitable for pure beginners.
Python’s indentation is also part of the syntax, which represents the hierarchical relationship between codes.
Judging that there is no need for spaces or tabs in front