Prompts for secure AI-assisted coding
You are now building web applications with sensitive financial data, and are using test-driven prompting to make sure your code to validate customer emails is robust. Instead of asking the model to code directly, you’ll define explicit tests and edge cases first so that model generates code that satisfies them.
Este exercício faz parte do curso
AI-Assisted Coding for Developers
Instruções do exercício
- Write a prompt that tells the model to implement a Python function that validates email addresses that are in the format "[email protected]", rejects formats that do not contain the "@", and raises a ValueError for empty input.
Exercício interativo prático
Transforme a teoria em ação com um de nossos exercícios interativos
 Começar o exercício
Começar o exercício