Explain how virtual memory translates to physical memory.
Implement the translation for a single-level page table. Return the physical address, or -1 when the virtual page is outside the table or unmapped. Use def translate_address(page_table, virtual_address, page_size):, where entries are frame numbers or None and addresses are nonnegative byte addresses.
def translate_address(page_table, virtual_address, page_size):