Section 3. Chapter 14
single
Challenge: Accessing Control System
Swipe to show menu
Task
Swipe to start coding
You are building a simple access control system for a building. Two boolean variables are already defined:
hasAccessCard→ indicates an employee.hasSpecialPass→ indicates a visitor pass.
Your task is to write an if statement that checks if at least one of these conditions is true.
- If access is allowed, display:
Access granted. - Otherwise, display:
Access denied.
Solution
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 14
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat