Grokking the Google Forward Deployed Engineer Interview
Vote

0% completed

​

Working with an AI Assistant When It Is Allowed

Candidate: "Write a function that takes a raw shipment id and returns it without the SHP- prefix, uppercased. Ids look like SHP-88412, and split shipments end in a letter, like SHP-88412S. Include three tests."

Assistant: "Here is a function and three tests. All three pass."

def clean_id(raw): return raw.strip().upper().strip("SHP-") assert clean_id("SHP-88412") == "88412" assert clean_id(" shp-88412 ") == "88412" assert clean_id("SHP-10077") == "10077"

The three tests pass, and the function is still wrong

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content