{"schemaVersion":1,"contentVersion":"3.4.0","id":"intermediate.19","languages":{"javascript":{"id":"intermediate.19","title":"Optional: numeric changes","moduleName":"Optional extensions","tips":"","concept":"<p class=\"lead\">Increment or decrement a decimal number while protecting nearby values.</p><p><strong>Before this lesson:</strong> Counts and recovery.</p><p>Ctrl-a increments the number at or after the cursor on the line; Ctrl-x decrements. A count changes the amount. These exercises use decimal integers; prefixed bases and complex numeric formats have their own rules. Check the chosen number before pressing the command.</p><h3>Example</h3><p>From 7, Ctrl-a gives 8. From the same 7, 3Ctrl-a gives 10. This is a numeric change, not three Insert-mode keystrokes.</p><p>Use Reset to try again.</p>","teaches":["arithmetic"],"introduces":["<C-a>","<C-x>","count"],"constraints":[],"drills":[{"task":"Change only the current decimal count to the desired value. Preserve the archived count.","hint":"Compare the complete target, including spaces, delimiters and protected lines. Undo is available.","mode":"jsx","start":"const current = 7;\nconst archive = 7;","startCursor":{"line":0,"ch":16},"paths":[{"keys":["<C-a>"],"tier":"idiomatic","technique":"arithmetic","core":["arithmetic"],"note":"The number at or after the cursor is the operand; the optional count sets the amount."}],"target":"const current = 8;\nconst archive = 7;","language":"javascript","evidence":"guided","canonicalKey":"intermediate.19#0","canonicalFingerprint":"8mkkiy"}]},"python":{"id":"intermediate.19","title":"Optional: numeric changes","moduleName":"Optional extensions","tips":"","concept":"<p class=\"lead\">Increment or decrement a decimal number while protecting nearby values.</p><p><strong>Before this lesson:</strong> Counts and recovery.</p><p>Ctrl-a increments the number at or after the cursor on the line; Ctrl-x decrements. A count changes the amount. These exercises use decimal integers; prefixed bases and complex numeric formats have their own rules. Check the chosen number before pressing the command.</p><h3>Example</h3><p>From 7, Ctrl-a gives 8. From the same 7, 3Ctrl-a gives 10. This is a numeric change, not three Insert-mode keystrokes.</p><p>Use Reset to try again.</p>","teaches":["arithmetic"],"introduces":["<C-a>","<C-x>","count"],"constraints":[],"drills":[{"task":"Change only the current decimal count to the desired value. Preserve the archived count.","hint":"Compare the complete target, including spaces, delimiters and protected lines. Undo is available.","mode":"python","start":"current = 7\narchive = 7","startCursor":{"line":0,"ch":10},"paths":[{"keys":["<C-a>"],"tier":"idiomatic","technique":"arithmetic","core":["arithmetic"],"note":"The number at or after the cursor is the operand; the optional count sets the amount."}],"target":"current = 8\narchive = 7","language":"python","evidence":"guided","canonicalKey":"intermediate.19#0","canonicalFingerprint":"8mkkiy"}]},"text":{"id":"intermediate.19","title":"Optional: numeric changes","moduleName":"Optional extensions","tips":"","concept":"<p class=\"lead\">Increment or decrement a decimal number while protecting nearby values.</p><p><strong>Before this lesson:</strong> Counts and recovery.</p><p>Ctrl-a increments the number at or after the cursor on the line; Ctrl-x decrements. A count changes the amount. These exercises use decimal integers; prefixed bases and complex numeric formats have their own rules. Check the chosen number before pressing the command.</p><h3>Example</h3><p>From 7, Ctrl-a gives 8. From the same 7, 3Ctrl-a gives 10. This is a numeric change, not three Insert-mode keystrokes.</p><p>Use Reset to try again.</p>","teaches":["arithmetic"],"introduces":["<C-a>","<C-x>","count"],"constraints":[],"drills":[{"task":"Change only the current decimal count to the desired value. Preserve the archived count.","hint":"Compare the complete target, including spaces, delimiters and protected lines. Undo is available.","mode":"text/plain","start":"Current count: 7\nArchive count: 7","startCursor":{"line":0,"ch":15},"paths":[{"keys":["<C-a>"],"tier":"idiomatic","technique":"arithmetic","core":["arithmetic"],"note":"The number at or after the cursor is the operand; the optional count sets the amount."}],"target":"Current count: 8\nArchive count: 7","language":"text","evidence":"guided","canonicalKey":"intermediate.19#0","canonicalFingerprint":"8mkkiy"}]}}}