Practice Questions (Students)

🔹 Basic Level

  1. Check if a number is even or odd using if-else
  2. Check if a person is eligible to vote (18+)
  3. Find largest of 2 numbers

🔹 Intermediate Level

  1. Find grade based on marks
    • 90+ → A
    • 60–89 → B
    • Below 60 → Fail
  2. Create a simple calculator using switch:
    • +, -, *, /
  3. Check username & password (hardcoded)

🔹 Advanced Level

  1. Build login system with roles (admin/user/editor)
  2. Validate form:
    • Name required
    • Email valid
    • Password min 6 chars
  3. Convert switch to match expression
  4. Create traffic light system:
  • red → stop
  • yellow → wait
  • green → go