Tell us what’s happening:
Test 2 on the daily challenge should not return an invalid video unit because “B”, bytes, is a valid video unit
Your code so far
def number_of_videos(video_size, video_unit, drive_size, drive_unit):
if video_unit not in ["B", "KB", "MB", "GB"]:
return "Invalid video unit"
if video_unit == "KB":
actual_video = video_size * 1000
elif video_unit == "MB":
actual_video = video_size * (1000**2)
elif video_unit == "GB":
actual_video = video_size * (1000**3)
else:
pass
if drive_unit not in ["GB", "TB"]:
return "Invalid drive unit"
if drive_unit == "GB":
actual_drive = drive_size * (1000**3)
elif drive_unit == "TB":
actual_drive = drive_size * (1000**4)
else:
pass
num = actual_drive // actual_video
return num
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36
Challenge Information:
Daily Coding Challenge - Video Storage
https://www.freecodecamp.org/learn/daily-coding-challenge/2025-09-21