← back to unit
Medium
# variables
Create Your Secret Agent Code
Every secret agent needs a Secret Code Number! Build yours in three steps, updating the same variable along the way. 🕵️
You're given a name, favorite number, and day of the month:
- Start
codeas the number of letters inname. - Reassign
codeto becodemultiplied byfavorite_number. - Reassign
codeto becodeplusday_of_month. - Print
code.
For example, Max, 7, 5 → letters in "Max" is 3 → 3 × 7 = 21 → 21 + 5 = 26.
💡 need a hint?
var-secret-code.py🔒 given lines are locked — write your code in between
loading...