E
E
Evgeny Kolesov2018-03-26 15:12:18
Python
Evgeny Kolesov, 2018-03-26 15:12:18

Why do we need a check or truth in python?

The crux of the matter is as follows. I'm going through a chapter in python where compound statements like if, elif, while, etc. are studied. I understand how everything happens, I understand that if true, the value of if will be given to me, if not, then there will be the value of Elif, etc.

if <test1>:
    <statements1>
elif <test2>
    <statements2>

# leave as an example. I also understood everything about indentation, but why, in principle, do we need a check for truth? and what is all this for?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
longclaps, 2018-03-26
@longclaps

How it all happens I understand, I understand

This is a good question, it shows that you do not understand anything yet.
Try to read a different book, their darkness is darkness. There are children, for example .

A
Alexander, 2018-03-26
@alexr64

if <оценка_по_алгебре == 2>:
    получить_по_жопе()
else:
   пойти_гулять()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question