mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): clarify instructions for step 44 (#65484)
Co-authored-by: Dario <105294544+Dario-DC@users.noreply.github.com>
This commit is contained in:
+9
-1
@@ -7,7 +7,15 @@ dashedName: step-44
|
||||
|
||||
# --description--
|
||||
|
||||
Right after the `invalid_records` variable, create a `for` loop to iterate over it. For each invalid record, print `Unexpected format '<key>: <val>' at position <index>.` (where `<key>`, `<val>`, and `<index>` should be replaced by the current key, value and index). Then, set `is_invalid` to `True`.
|
||||
Right after the `invalid_records` variable, create a `for` loop to iterate over it. For each invalid record, print `Unexpected format '<key>: <val>' at position <index>.`. Replace `<key>`, `<val>`, and `<index>` with the current key, value, and index.
|
||||
|
||||
Remember that `invalid_records` is a list of keys that refer to invalid records in the current `dictionary`. You will need to take the key from `invalid_records` and look up the value in `dictionary`.
|
||||
|
||||
Position or `index` refers to the current dictionary in `medical_records`, defined by the outer `for` loop in the function.
|
||||
|
||||
Review your code so far if you need to remind yourself of the loops and variables already created.
|
||||
|
||||
Then, set `is_invalid` to `True`.
|
||||
|
||||
Feel free to test the `validate` function with invalid data to see the validation messages.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user