+ 1
explain what is max=max and max=0 means code in description
4 ответов
+ 11
⚡_AruN_⚡
your question / code sample is truncated since the *question section* can only take a limited number of characters as input.
it would be helpful if you could add the complete code you are talking about to your post but not only 1 line.
+ 7
⚡_AruN_⚡ ,
first of all:
> we should *not* use *max* as a variable name, since this also is the name of built-in function of python.
> using reserved names for objects like variables (and others), can lead to unexpexted results or behavior of the program.
> max = 0 is the declaration and initialization of a variable with the value of 0. in the current code this step is *not required*, since max is created
inside the first *if... else...* conditional.
in other cases (if max will be used for comparison in the first conditional) it may be necessary.
> max = max means that the variable max gets assigned to itself. this step is *not required* and the complete *else* clause can be removed.
+ 3
For maximum number you need to learn about if else statements
+ 1
Sorry sorry I will update