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.
Diese Übung ist Teil des Kurses
AI-Assisted Coding for Developers
Anleitung zur Übung
- 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.
Interaktive Übung
In dieser interaktiven Übung kannst du die Theorie in die Praxis umsetzen.
 Übung starten
Übung starten