4 ответов
+ 8
If statements have pretty straightforward construction:
if [something is True]:
<do this>
elif [something else is True]:
<do that>
else [in all other cases]:
<do otherwise>
If you share your code we might be more specific about it. Meanwhile, refresh the relevant lesson here:
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2277/
+ 4
The issue in your code in the moment is that you try to use an undefined identifyer:
print(Approved)
use instead:
print("Approved")
+ 1
The logics of code - if, else, loops - is something you have to (first understand, sure, but then) constantly practice until it starts to feel natural.
Depending on where you start, that may take a while. The logic muscle has to develop over time - by training.
+ 1
Thanks for the help, I will pratice more with the tips, and understand the code better.