An engineering source file occupies exactly 1240 bytes. Every character in its text occupies one byte. Its 32 lines consist of 28 lines containing source text and four internal lines containing only three spaces each. Nine of the source-text lines end with four spaces each; the other source-text lines have no trailing spaces. The final line contains source text.
The first 31 lines each end with a two-byte carriage-return-and-line-feed sequence, abbreviated CRLF. The final line has no ending sequence. A line-feed ending, abbreviated LF, occupies one byte. No other bytes are present.
You save two independent copies of the original file with these editor settings:
Neither save changes any other source characters or adds an encoding marker. Find the final size of Copy A and the final size of Copy B, in bytes, as exact integers.
Unlock full course notes by signing up
Compare manual and bulk editing time
You need to change 45 intended occurrences of an identifier in a source file. Assume the following constant times and no additional overhead:
Manual editing takes 7 seconds to change each occurrence.
Bulk editing takes 30 seconds total to set up and apply all replacements.
Count characters and display columns
An editor places tab stops, the columns to which a tab advances the cursor, at columns 4, 8, 12 and so on. Each sequence below begins at column 0. A space advances the cursor by one column; a tab advances it to the next tab stop strictly to its right.
For each sequence, enter the number of stored whitespace characters and the final cursor column as exact integers. Each tab and each space counts as one stored character. A tab does not always advance the cursor by four columns.
Prevent replacement collisions
A Python file contains this complete snippet:
You must rename every original raw identifier to scaled and every original scaled identifier to filtered. The identifier filtered is initially absent. The final text should preserve which value each occurrence refers to.
Your editor supports replacement passes that replace every current occurrence of one exact identifier. You will finish both passes before running the file.
Review a rename that also changes indentation
An editing task requires renaming flow_l_s to inlet_flow_l_s while preserving the program's behavior. Each snippet below is run separately for readings of 1.5 L/s and 2.5 L/s. In every run, limit_l_s is 2.0 L/s. Both functions return normally; record logs one reading each time it is called.
Original text:
Edited text: