ComenzarEmpieza gratis

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 ejercicio forma parte del curso

AI-Assisted Coding for Developers

Ver curso

Instrucciones del ejercicio

- 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.

Ejercicio interactivo práctico

Pon en práctica la teoría con uno de nuestros ejercicios interactivos

Empezar ejercicio