All MicroEvals
Complete the following Python function: ```python def fizz_...
Create MicroEval
Header image for Complete the following Python function:

```python
def fizz_...

Complete the following Python function: ```python def fizz_...

Prompt

Complete the following Python function: ```python def fizz_buzz(n: int): """Return the number of times the digit 7 appears in integers less than n which are divisible by 11 or 13. >>> fizz_buzz(50) 0 >>> fizz_buzz(78) 2 >>> fizz_buzz(79) 3 """ ```

Answer guidance

Canonical solution (function body): ns = [] for i in range(n): if i % 11 == 0 or i % 13 == 0: ns.append(i) s = ''.join(list(map(str, ns))) ans = 0 for c in s: ans += (c == '7') return ans

Drag to resize
Drag to resize
Drag to resize