# Given is_subscriber, is_banned, and is_admin, a user can access a premium feature if they are a subs

Canonical URL: <https://datadriven.io/problems/given-issubscriber-isbanned-and-isadmin-a-user-can-acc-86cc68e7>

Domain: Python · Difficulty: medium

## Problem

Given is_subscriber, is_banned, and is_admin, a user can access a premium feature if they are a subscriber AND not banned, OR if they are an admin. Use parentheses to calculate can_access and print it.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/given-issubscriber-isbanned-and-isadmin-a-user-can-acc-86cc68e7)
- [Python Interview Questions](https://datadriven.io/python-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.