curriculum/challenges/english/blocks/daily-coding-challenges-python/68b1f72371a5ac895ac70a02.md
Given a photo size in megabytes (MB), and hard drive capacity in gigabytes (GB), return the number of photos the hard drive can store using the following constraints:
number_of_photos(1, 1) should return 1000.
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(number_of_photos(1, 1), 1000)`)
}})
number_of_photos(2, 1) should return 500.
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(number_of_photos(2, 1), 500)`)
}})
number_of_photos(4, 256) should return 64000.
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(number_of_photos(4, 256), 64000)`)
}})
number_of_photos(3.5, 750) should return 214285.
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(number_of_photos(3.5, 750), 214285)`)
}})
number_of_photos(3.5, 5.5) should return 1571.
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(number_of_photos(3.5, 5.5), 1571)`)
}})
def number_of_photos(photo_size_mb, drive_size_gb):
return photo_size_mb
def number_of_photos(photo_size_mb, drive_size_gb):
drive_size_mb = drive_size_gb * 1000
return drive_size_mb // photo_size_mb