Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Access and Perks Checker | Booleans and Comparisons
Data Types in Python

bookChallenge: Access and Perks Checker

Task

Swipe to start coding

You're checking simple user conditions during checkout. All input variables are already defined - do not change them. Use only comparison and logical operators: ==, !=, <, <=, >, >=, and, or, not, and parentheses.

Compute:

  1. is_adult β€” the user is at least adult_age.
  2. can_enter β€” the user can enter if they are an adult and have an ID.
  3. qualifies_free_shipping β€” true if purchase_total meets the free_shipping_threshold or the user is a member.
  4. needs_manual_review β€” true if email or phone is not verified.
  5. valid_score_range β€” the score is within the range [min_score, max_score] using a chained comparison.

Finally, print all five results in one line.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 5
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

Awesome!

Completion rate improved to 5.26

bookChallenge: Access and Perks Checker

Swipe to show menu

Task

Swipe to start coding

You're checking simple user conditions during checkout. All input variables are already defined - do not change them. Use only comparison and logical operators: ==, !=, <, <=, >, >=, and, or, not, and parentheses.

Compute:

  1. is_adult β€” the user is at least adult_age.
  2. can_enter β€” the user can enter if they are an adult and have an ID.
  3. qualifies_free_shipping β€” true if purchase_total meets the free_shipping_threshold or the user is a member.
  4. needs_manual_review β€” true if email or phone is not verified.
  5. valid_score_range β€” the score is within the range [min_score, max_score] using a chained comparison.

Finally, print all five results in one line.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 5
single

single

some-alt