Python terminology questions

Asked 1 years ago, Updated 1 years ago, 101 views

Conditions The Boolean expressions you’ve seen so far could all be considered conditions, which are the same thing as expressions; condition is just a more specific name in the context of flow control statements. Conditions always evaluate down to a Boolean value, True or False. A flow control statement decides what to do based on whether its condition is True or False, and almost every flow control statement uses a condition. Blocks of Code Lines of Python code can be grouped together in blocks. You can tell when a block begins and ends from the indentation of the lines of code. There are three rules for blocks. Blocks begin when the indentation increases. Blocks can contain other blocks. Blocks end when the indentation decreases to zero or to a containing block’s indentation. Blocks are easier to understand by looking at some indented code, so let’s find the blocks in part of a small game program, shown here:

I'm studying Python this time, and I don't know what conditions and blocks of code mean in Korean, so please help me. What do those two mean in computer terms? And I don't understand the three conditions in the block of codes, so I would appreciate it if you could explain it. Book Source: Python

terminology

2022-09-21 10:42

1 Answers

Conditions

Code block

A code block begins with indentation. A code block may be included in the code block again. The end of the block ends at the end of the indent that started.


2022-09-21 10:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.