# Write a function to simulate 25 coin flips with 50/50 probability. Return the number of heads.

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/questions/3726/simulate-25-coin-flips-function
Source observed: 2026-11-05T00:59:49.844Z
Last checked: 2026-11-05T00:59:49.844+00:00
Indexed: 2026-11-06T18:37:03.81+00:00

---

# Write a function to simulate 25 coin flips with 50/50 probability. Return the number of heads.

We provide this as an interview-practice coding question. The task is to write a function that simulates **25 coin flips**, with each flip having **50/50 probability**, and returns the **number of heads**.

## Community answers

No answers have been contributed by the community yet.

## Related questions

- [Given a biased coin function, write another function to make it return heads or tails with equal probability.](https://www.aced.io/questions/3397/create-unbiased-coin-from-biased)
- [Write a function to return all prime numbers up to a given number n.](https://www.aced.io/questions/3629/prime-numbers)
- [Given a string with parentheses, write a function that removes the minimum number of characters to balance the parentheses.](https://www.aced.io/questions/4537/balance-parentheses-string-manipulation)

## Your answer

Submitting an answer marks this question complete. The answer controls require logging in or signing up before responding.

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F3726%2Fsimulate-25-coin-flips-function&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F3726%2Fsimulate-25-coin-flips-function). Opening a form does not execute a tool.