إعلانيمكن أن تكون علامتك التجارية هناعلامتك التجارية هنافي كل صفحة من Darslab · طلاب وأولياء أمور ومعلمونinfo@darslab.comاسأل عن الأسعارالأسعارinfo@darslab.com
☰ خطة العام · تكنولوجيا المعلومات والاتصالات (بالإنجليزية)

Operators and the if statement

الأسبوع 12 · الوحدة ٣ «إنشاء صفحات الموقع» (٥) الموضوع الثاني المعاملات والجمل الشرطية في PHP: المعاملات الحسابية والإسناد والمقارنة والمنطقية، if وelse وelseif والشرط المختصر · 3 دروس
Answers are for parents and teachers.
1
Trace $x: $x = 9; $x -= 4; $x *= 3; $x %= 7; $x++;
2
Complete the truth table for X ∨ Y when X is false and Y is true; then for X ∧ Y.
3
A shop gives a discount to members with 20 points or more. Write the condition, then say whether a member with exactly 20 points gets it.
4
What does this print? $age = 15; if ($age >= 18) { echo "adult"; } elseif ($age >= 13) { echo "teen"; } else { echo "child"; }
5
Find the two syntax mistakes: $y = ($x = = 1) ? "A" : "B"; and $count–;