Skip to main content
🔒 Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the rest of the curriculum. Card required, cancel any time in Dashboard.Start 7-day trial →
← CoursesSystem Design for Python JuniorsModule 4 · Messaging, Streaming, MicroservicesDesigning a video upload + transcoding pipelinepredict51 / 105
+150 XP
Task
📝 **Question:** Predict the printed line `seq=<seconds> par=<seconds> speedup=<ratio>` for the sequential vs parallel transcode model. 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.
Predict the output

Read the code carefully

import math

CHUNKS = 30           # 30 one-minute chunks of a 30-min video
PROFILES = 5          # 240p, 480p, 720p, 1080p, 4K
COST_PER_CHUNK = 10   # seconds of compute per (chunk, profile)
WORKERS = 50          # parallel transcode workers in the fleet

seq = CHUNKS * PROFILES * COST_PER_CHUNK
jobs = CHUNKS * PROFILES
par = math.ceil(jobs / WORKERS) * COST_PER_CHUNK
print(f"seq={seq} par={par} speedup={seq // par}")

What will the program print? Write here:

💬 Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…