ACTIVITY 17 / 50
Try as many times as you needTwo conditions together
Let’s understand
and requires both conditions to be true. or needs at least one true condition. not changes True to False and vice versa. Parentheses make it clear which checks belong together.
Listen to the explanation
Example
print(4 > 2 and 8 > 5)Read temperature and light on two lines. Print GROW if temperature >= 15 and light >= 5, otherwise WAIT.
I need a hint
Join the checks with and.
How to find an error
- Read the last line of the error message.
- Find the indicated line. Check quotes, parentheses and indentation.
- Change one thing and run again.
main.py
4 spaces
Your draft stays in this browser.
Result
PythonYour program’s output will appear here. Click Run.
Мой профиль