Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to safely execute a command in a sandboxed environment.
Agentic_ai
sandbox.execute([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to restrict the sandbox to only allow read operations.
Agentic_ai
sandbox.set_permissions([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the sandbox initialization to prevent dangerous code execution.
Agentic_ai
sandbox = Sandbox([1]=False)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to create a sandbox that limits CPU and memory usage.
Agentic_ai
sandbox = Sandbox(cpu_limit=[1], memory_limit=[2])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to safely execute user code with timeout and restricted imports.
Agentic_ai
sandbox = Sandbox(timeout=[1], allowed_imports=[2], safe_mode=[3]) result = sandbox.run(user_code)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
