Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Uitdaging: Toegangs- en Voordelencontrole | Booleans en Vergelijkingen
Gegevenstypen in Python

bookUitdaging: Toegangs- en Voordelencontrole

Taak

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.

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 5
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

close

bookUitdaging: Toegangs- en Voordelencontrole

Veeg om het menu te tonen

Taak

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.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 5
single

single

some-alt