## [BUG] Unit-1 / Final Quiz - Don't change the value of page

I keep getting an error that says "Your submission was incorrect. Don't change the value of page."

I've not changed the value of page, and my code runs fine on a regular python interpreter.

# page = contents of a web page
page = '<div id="top_bin">    <div id="top_content" class="width960">       <div class="udacity float-left">            <a href="http://www.xkcd.com">'
start_link = page.find('<a href=')
start_url = page.find('"',start_link) + 1
end_url=page.find('"',start_url)
url = page[start_url:end_url]


how is that changing the value of page?

asked 21 Feb '12, 00:41

gubatron
156148

accept rate: 100%

1

I've updated the quiz to use a page variable without spaces. So paste in everything after start_link= and it should work.

(22 Feb '12, 17:11)

## 24 Answers:

Try your solution now. I've updated the grading code. Sorry for the trouble!

answered 21 Feb '12, 01:53

PeterUdacity ♦♦
36.2k73220333

start_url = page.find('"', start_link)
end_url = page.find('"', start_url + 1)
url = page[start_url + 1:end_url]


This yields "Good job" on the bottom alert but "Try again" on top. I say give it a couple days and try again after they have time for some ironing out.

j

answered 21 Feb '12, 01:03

Jake Solomon
4824921

1

That was a fault on my end. Fixed now!

(22 Feb '12, 17:12)

one step method method

url= page[ start_link+9 : page.find('"',start_link+10)]

answered 21 Feb '12, 12:16

1linsanity
2.8k73041

This wont help next week when u need to fined all urls

(25 Feb '12, 18:55)

@Marek Kotewicz and @KarenT: While your code does produce the correct output, we wanted you to use the "find" command in this problem.

Also, some quizzes will expect you to print something and some will not. We realize that this is an easy thing to make a mistake with and we will try to always be as clear as possible (for example, the print command will usually be pre-populated in the code if we expect a print), but if you ever make a mistake you will be told so with an error message and you can easily make the necessary change.

answered 21 Feb '12, 18:20

AndyAtUdacity ♦♦
57.6k112260301

i tried and got the result ..it works ..

answered 22 Feb '12, 05:00

priya
3062515

I have experienced the same issue, hope they find a solution for this quickly

answered 21 Feb '12, 01:46

I can confirm that this quiz is working correctly. jsolomon, I tried your code and it worked for me, so they possibly have fixed it since you tried it last.

answered 21 Feb '12, 02:05

Eric Solomon
2.4k71325

Hello Peter

When I write code, it shows the correct output but when I submit, it wont accept
The error says : "Your submission was incorrect. You shouldn't print anything for the submission in this quiz."

answered 21 Feb '12, 05:34

Dinesh M-2
1.7k1126

ilikeudacity, you don't print anything in this quiz. I'm guessing you did what a lot of others, myself included, did at first as well and printed the url at the end. Remove your print statement and submit. =D

answered 21 Feb '12, 07:46

Jacob C. Ting
26018

It is working now.

answered 21 Feb '12, 09:52

Dinesh M-2
1.7k1126

Your answer
Question text:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• link:[text](http://url.com/ "Title")
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

## Tags

×29,752
×3,802
×733
×207

Asked: 21 Feb '12, 00:41

Seen: 2,467 times

Last updated: 08 Apr '12, 04:37