search

Home  >  Q&A  >  body text

Guys, please help me explain why I have so many red prompts.

1.jpg Guys, new technical secondary school students are starting their journey, why are there so many red numbers here

帆1531 days ago1458

reply all(2)I'll reply

  • 移动用户-6305425

    移动用户-63054252021-01-05 20:16:29

    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.

    reply
    0
  • Dispensable

    Dispensable2020-10-09 23:46:38

    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

    reply
    1
  • Cancelreply