🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.

Project 22: Viewer Completion Simulator

Data Engineer

Builds on these lessons

Current Task

Objective

np.random.binomial() simulates repeated yes/no trials with a given success probability — useful for simulating events like 'did the viewer finish watching?'

Task: seed the generator with 5, then simulate 10 viewers with a 70% chance each of watching the full video.

index.py
import numpy as np np.random.seed(5) watched_full = np.random.binomial(n=1, p=0.7, size=10) print(watched_full)

* Hint: Correct characters turn green, incorrect ones turn red.

Live Preview
🖼️

Verify your code to see the preview