2/15 Help! i checked related answers and found no why



after if and else you need to indent:

if condition:
    do something
    do something else

the indent refers to the tab/spaces at the beginning of the line


it worked. thank a lot. I missed the use of space.


could you tell me whether i can put False first and else True
i found it won't work if i turn over. thank you very much.


No, not in the exercise. The exercise wants you to do things a certain way


thank you very much. i wonder how to use this line in practice. could you give a context where it will be used, because i can't recognize the input an output.


Well, this exercise is to practice with if and else, which you will need. A lot. If you want to write a simple game to determine i there is a hit, you could use if to determine if there is a hit. You could use if to check/validate user input, and many many more