Briefle
LearnGlossaryPricing

Briefle words · Code & architecture

Deterministic

Always producing the same output for the same input.

Say it to an AI

Python pure function order_total(items, delivery_fee, promo=None) that returns the total in integer cents with a 5% service fee rounded to a whole cent. No side effects: don't mutate items or the order, no globals; handle the FREEDEL promo inside and keep it deterministic so it's trivially unit-testable.

How an expert would brief the stronger version of “Order total”.

See it

Try it as a puzzle →

A food-delivery backend prices a customer's basket before showing the checkout screen.

Study A · the weaker one
Study B · the stronger one

Why: B's 'assert order_total(basket, 300) == 2400' holds every time; A's result and its effect on 'order' depend on what earlier calls already did to that same 'order' dict.

Related words

  • Single responsibility principle
  • Flag argument
  • Side effect
  • Parameter object
  • Long parameter list
  • Named arguments
  • Options object
  • Utils file

Room 3 · Functions & structure

Learn “Deterministic” in a five-minute lesson

Start free
AI can build almost anything. The bottleneck is saying what you want.
WordsPricingTermsPrivacyRefundsContact
© 2026 Briefle