## 02-31 Crafting Input Solution

• 0:00 - 0:02
All right. Let's go take a look at the big reveal,
• 0:02 - 0:04
for how it actually started.
• 0:04 - 0:08
Up here is our string; we start at characters zero, on line 1, with ' This '.
• 0:08 - 0:14
1, 2, 3, 4, 5--now we're on line 1, character 5, with the ' is '.
• 0:14 - 0:21
6, 7, 8, 9, 10, 11--we're on line 2, character 11,
• 0:21 - 0:23
and we're starting the Left Angle, then the ' b ',
• 0:23 - 0:25
then the Right Angle, then the ' webpage '.
• 0:25 - 0:29
And to reverse engineer this, you might note--for example--
• 0:29 - 0:32
that you know the Left Angle is 1 character.
• 0:32 - 0:36
If it starts on character 11, and the ' b ' comes right after it on character 12,
• 0:36 - 0:39
there must be no spaces between them.
• 0:39 - 0:43
Similarly, since the ' b ' is 1 character and it starts on character 12,
• 0:43 - 0:47
the RANGLE, there must be no spaces between the ' b ' and the RANGLE.
• 0:47 - 0:50
So the real trick here is figuring out what happens
• 0:50 - 0:53
after the "is" and before the ' b ',
• 0:53 - 0:56
and knowing that you need these 3 extra spaces
• 0:56 -
ao all the action's happening here.
Title:
02-31 Crafting Input Solution
Description:

more » « less
Video Language:
English
Team:
Udacity
Project:
CS262 - Programming Languages
Duration:
01:00
 Amara Bot added a translation

• Amara Bot