+ 1
Boolean Or-explanations
age=15 Money=500 if age>18 or Money>100 print("welcome") Why in the third line is used "or"? I understand the lesson but why it is used here?
3 Respostas
+ 1
because want to checked if user got money or age above 18. lf user got money more then 100 (true) but age less 18 (false) , then user still can enter or whatever. At least need 1 statement is true, then message "welcome" showed. If both statement is false, then it goes false and message "welcome" not displayed.
- 1
Plain english-
If you have 100$ or your age is above 18 you are welcome.
- 1
--_--