Challenge: Accessing Control System
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
Awesome!
Completion rate improved to 1.35
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